Azure connection string is ignored

Borsoi Emanuel 296 Reputation points

I have an AppService deployed and running on Azure. It connects to a Google Cloud PostreSQL database and have no problems.
In order to remove the connection string from the appSettings.config, I want to use an Azure connection string, which should override the appSettings.config value. I wrote should because I did it, but the value set in Azure is completely ignored.
This is my appSettings:

    "ConnectionStrings": {
        "postgres": "Host=XX.XX.XXX.XXX;Database=production;Username=portal;Password=myPassword"

As I mentioned before, it is running. IF I add a value postgres with value "Host=XX.XX.XXX.XXX;Database=production;Username=portal;Password=wrongPassword", it still works, even if it souldn't.
What am I missing or doing wrong?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,504 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 24,301 Reputation points Microsoft Employee

    Hi @Borsoi Emanuel ,

    Not sure if appSettings.config was a typo or not but App Service will overwrite settings from either web.config or appSettings.json. If you're expecting the values to be overridden, make sure you use Connections Strings area in the portal.