I'm trying to connect my Azure Web App to my AzureSQL database.
In the Kudu Env (https://{my-app-name}.scm.azurewebsites.net/env) there is some kind of default connection string:
LocalSqlServer
- ConnectionString = data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true
- ProviderName = System.Data.SqlClient
I have set the connection string in the App configuration, it looks like this:
Data Source=tcp:myapp.database.windows.net,1433;Initial Catalog=databaseName;User ID=databaseSA;Password=password;
But no matter what I try, the connection string in the Kudu environment never changes. This connection string is also set no where by me, neither in the code base nor in any Azure settings I found.
It's very similar to this SO, which never got resolved: Azure Web App Not Showing Connectionstring in Kudu Env
This is the error message that throws when the app tries to access the database, which makes sense since the connection string tries to connect to .\SQLEXPRESS which doesn't exist anywhere (locally I use .\SQL2019 as connection string):
I would appreciate any help or hint.