Web.config changed (dramatically) during Azure deployment

After deploying to Azure, I continued to get server errors - the application did not start. So I did the remote desktop on the instance and found that web.config was completely redesigned ... what is happening? I thought web.config was packaged as is? Instead, the entire configuration has been replaced. When I replace the "new" version with the original, immutable, correct configuration, my application works as intended.

First, what's going on here? What am I doing wrong? Thus, I can understand and not duplicate this in the future.

Secondly, how do I stop this behavior? I want the original web.config to be deployed, and not some arbitrary impostor. Thank!

+5
source share
2 answers

Based on the unzip clause for the cskpkg file, I noticed that web.config was never even packaged - so Azure must have created the baseline out of necessity (without warning me!?!?). After some investigation, I came across this nugget (from fooobar.com/questions/1116732 / ... ):

It turns out that the web.config file was not even included in the deployment package. Somehow, the BuildAction file of the web.config file has changed from Content to None.

After changing the BuildAction to "Content", my deployment now works as expected.

+2
source

( , web.config.debug .release), . - machineKey, - - ( , ). , , , machine.config( web.config). , , .

, , - cskpkg .zip . - . .zip, , - . web.config , , . , , , , .

+2

All Articles