Search code examples
azureasp.net-coreasp.net-web-apiazure-web-app-service

Core Web API reading configuration values from incorrect deployment slot


I have an application that was deployed via a deployment slot that is reading values from the incorrect place. I have an automated deployment going to my testing deployment slot and then I used the swap function in Azure portal to promote the build to production. When I look at each individual configuration section for each deployment slot my configuration values are different and they are all checked on as 'Deployment slot setting'. However, my production build continues to retrieve values that are only present in the testing slot. Did I miss something during the swap? I've tried restarting the service and no luck.

The value that is being returned when I query my configuration setting is not present in any deployment slot. I looked for it in source and it's not present. I'm baffled by this one.


Solution

  • Just wanted to followup on this in case anyone else runs into something similar. The issue was an automated deployment with GitHub Actions that was reporting as correct but when really digging into the details the incorrect branch was being deployed after some recent changes to the way we deploy. An incorrect build with a hard-coded value stayed in production. Start from the basics and work your way up the deployment chain, don't take any OK/green status badges fool you!