Reputation: 1122
I have a .net core web app that works well in local environment. However, I got this exception when I publish it to Azure Web App:
Then I found this article and did the same approach as the image shows:
However, it fails once the setting is applied.
The difference between the tutorial and my web app is that my one has a SSL certification to enable https connection. Do I need some extra management to make the web app get the connection string under this condition?
EDIT:
I saw @lolops's post and found there was a right coonection string in kudu environment. So I published it again... and it worked. It's odd and I don't know why the problem has been gone.
What I did specially was only restarting my PC. Could this be a solution? Anyway sorry for troubling.
Upvotes: 2
Views: 192
Reputation: 107
Try visiting https://YOURPROJECT.scm.azurewebsites.net and find "Environment variables", search for your connection string and compare to the variable you use. It will be prefixed with the type of connection you chose (SQLAzure).
Upvotes: 1