2

I've followed what seemed to be a very straight forward setup to configure azure to transform my web.config but it isn't working as I expect. Here's what my web.config looks like locally. web.config on local

Here's what my appSettings section looks like in the Azure Portal. By the way, this is a Dev slot and I'm deploying from Visual Studio Team Services. enter image description here

Here's the outcome, my web.config on azure. I expect the web.config to have my new connection string, but as you can see, it does not. It wouldn't bother me too much if it just wasn't showing here, but the site is broken, so I assume, the transform isn't happening at all. web.config on azure

P.S. I've also tried this in a similar fashion with appSettings with the same result

Shane Drye
  • 93
  • 3

1 Answers1

4

Your Web.config file will not be updated. They are replaced at runtime, and you can access the values through ConfigurationManager as usual.

App settings and connection strings defined in the portal also define environment variables which you would use on other platforms than ASP.NET.

juunas
  • 41,356
  • 5
  • 86
  • 118
  • Thank you. I suppose I had something else wrong then, which broke my site (it's working now). So, there's no way to see what the config looks like for the currently running api? Also, since you mentioned environment variables for other platforms, do you know if it would work for an angular app, using their environment variables files : environment.prod.ts? – Shane Drye Oct 23 '17 at 10:56
  • @ShaneDrye, you can see the config for a running API for example by using the Cloud Explorer in Visual Studio. Choose the relevant subscription, locate your api and search in the "Files" folder. You should see your config file over there. – Jorn.Beyers Oct 23 '17 at 12:13