After deploying to Azure, I kept getting server errors -- the application would not run. So I did a remote desktop into the instance and found that the web.config was completely overhauled...what's going on? I thought web.config was packaged as-is? Instead, the entire configuration has been replaced. When I replace the "new" version with the original, unaltered, correct configuration, my app works as intended.
First off, what's going on here? What am I doing wrong? This way I can understand and not replicate this in the future.
Secondly, how do I stop this behavior? I want the original web.config deployed -- not some arbitrary imposter. Thank you!
Unless you have a transform specified (using normal, built-in web.config.debug and .release), it doesn't transform any user settings. At one point of time, it did transform the machineKey settings such that your web roles would operate in a web farm scenario (nothing would work behind load balancer if it didn't). I am sure it still does this, but it might be doing it at the machine.config level now (leaving your web.config alone). I haven't checked on this in some time, so not sure what it does now.
Easy way to check what will be deployed is to just package your cskpkg and open up it up as a .zip file. Inside will be another file that has your web role name in it. Open that up as a .zip again and you should see your web site all packaged up. Check the web.config and make sure it is what you need. If not, then post back here what you think shouldn't be changed.
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