C
C#2y ago
langehk

❔ ConnectionString to Azure SQL Server

I have created the following sql server in Azure, copied the ConnectionString and pasted in my appsettings. My issue is the "Authentication="Active Directory Default" . Which looks like it's being formatted incorrectly. I've also tried to put it on the same line. The application won't start. But I'm able to connect to it from SSMS. Server=tcp:dbname.database.windows.net,1433;Initial Catalog=dbname;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;Authentication="Active Directory Default";
4 Replies
Anchy
Anchy2y ago
I think you can omit the quotes for the authentication, it also looks like the rest of your JSON does not have valid formatting
langehk
langehkOP2y ago
I’ve tried that. But then it says invalid auth or something like that. The json formatting you’re referring to is when I copy paste the connection string. Then that happens. I’ve tried many different ways 😅
Anchy
Anchy2y ago
you can escape the extra quotes then by placing a backslash before any characters you wish to keep as part of the literal string
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?