Hi @WASIM
From your description, you should currently only have the database connectionstring configured in the project appsettings.json
or web.config
.
The database connection connection information is not configured in the following figure (azure portal and visual studio2019/2022).
So when you downloaded the publish file, it will not contain the connectionstring details.
In App Service, configurations in the Azure portal take precedence over file configurations in your project, so it doesn't matter if you're using a database connection string from a test environment when publishing. As long as you make sure Azure Portal has a connection string for your production environment, the settings in Azure Portal will be automatically used after publishing.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards,
Jason