❔ Can't deploy my C# ASP.NET MVC + Postgres app to Azure
Hey ! I am trying to deploy an ASP.NET MVC 7 + EF + Postgres app on Azure but my app crashes on start. Weird thing is that it doesn't seems like it can connect to the database, and it loads the empty value stored in my
appsettings.json
instead of the ConnectionString i added in Azure. If i don't set the empty string the app just crashes saying that my AZURE_POSTGRESQL_CONNECTIONSTRING
connection string is not set.
However, when i manually ssh into the server and then set my prod database string it does work... Since i am using a CI/CD pipeline, it is kind of boring to set them every new deploy5 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Here is how i am resolving the value in my application :
And i am setting the value into the settings of my Azure Web App!
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Even if i set the Connection strings into the Connection string section ?? Seems weird
I'll try
I have tried to set the connection string like you said, and it still doesn't work :/ i've been trying to fix this problem since a week and even when looking at microsoft docs i couldn't find a solution
Wait, i'll try changing my ConnectionString Ssl Mode since theres been a breaking change into Npgsql ssl library, havent tried that yet
Edit : still not working :/
2nd edit : wait, i havent applied migrations
3rd edit : everything seems to be working again, i don't know how ??
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.