Reputation: 427
I have the following appsettings.json
file, with the connection string taken from my Azure SQL database dashboard:
{
"ConnectionStrings":
{
"DefaultConnection": "Server=tcp:xxxxx.database.windows.net,1433;Initial Catalog=xxxxx;Persist Security Info=False;User ID=xxxxx;Password=xxxxxxx;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;Connection Timeout=60;"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
which seems not to work. Is there some more specific formatting it has to undergo?
Upvotes: 0
Views: 881
Reputation: 766
Without having the exact information on the error that you are getting and the place where you are trying to use the connection string, first thing I would check is, if the development mode is enabled and if it is looking for an "appsettings.Development.json" file.
If this is not what it is, please update the question with the error that you are getting with the exact line where you are getting the error.
Upvotes: 1