App configuration settings unavailable after auto slot swap (sometimes manual)

Ron Michael Zettlemoyer 1 Reputation point
2020-02-01T13:51:05.32+00:00

I've just started seeing this weird issue over the last week. I deploy my ASP.NET 4.7 site from Visual Studio into an app service deployment slot. Azure autoswaps it to production. But then the site can no longer get any configuration settings using System.Configuration.ConfigurationManager.AppSettings. They all return as blank. I have to restart the app to get the configuration settings to come in again. Sometimes if I wait long enough (5-10 minutes?) it seems to fix itself without having to restart.

I'm seeing this very consistently in one single app service but can't reproduce it any any of my other app services on the same app service plan, or other app service plans. For the heck of it, I scaled up my app service plan from S3 to P2V2 and I was able to do a single deploy without a problem. But future deploys after that exhibited the same problem.

I do have a ticket open with Azure support but we aren't making much progress yet so I wanted to share this and see if anyone else has noticed anything similar.

Again, this problem only started over the last week - since around January 28th or 29th 2020. It's been working fine for us for years before this point. And I've been able to determine that it can happen after a manual slot swap as well as a deployment from Visual Studio -- although it seems to happen much more often and more consistently after an autoswap as opposed to a manual swap.

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

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 17,870 Reputation points
    2023-08-23T06:30:09.4333333+00:00

    Configure application initialization in your web application. This might help with ensuring that the application is properly initialized after a swap or deployment.

    0 comments No comments