I am deploying a website written in Asp.Net Core 2.2 which has a connection to an Azure Sql Database. Where do I set the Connection String in the Azure App Service deploy task in Azure DevOps?
In my WebApp, the DefaultConnection is in appsettings.json which works fine locally. I want to override this when deployed to Azure.
I tried setting -DefaultConnection $(DefaultConnection) in the Application and Configuration Settings section of the Azure App Service deploy task but the Connection String did not get set. The value is in a variable in Azure DevOps.
Where am I going wrong?
There is a new preview task Azure App Service Setting can help you with.

You can refer to this Deploy Connection Strings using Azure App Service Deploy #9017
It may need you define the value of ConnectionString in the Azure app service.

This could not be configured in Variables if you want to set it in Configuration setting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With