I know this is super weird, so to make you believe me and help me, I provide lots of evidence here.
Problem: the web.config
file under site/1/views
has been changed during Azure Deployment.
Facts:
- The file exist in
.cspkg
package, not the case here - No other
web.config
been changed, not the root one, not the one in site 2,3,4.., not in area, not in any other places. The whole solution has 10+ web.config files, but only this one, the one underViews
ofsite/1
has been changed. - File is not been replaced, is been edited, only change is
2.0.0.0
->1.0.0.0
and4.0.0.0
to3.0.0.0
, which is a targeted vandalize, I have to say. Nothing else changed, my own namespaces defined still there.
Tried:
- Remote Desktop to the Azure Instance, edit the file, the site works, and it won't change back even after reboot (except the reboot at Azure interface which whole package just reloaded)
- Repackage and redeploy, twice, no use.
Changes I made from last deployment, which was a success one
- Install Visual Studio 2012 Ultimate trial today
- Upgrade the whole solution from MVC3 to MVC4, Azure SDK from 1.0 to 1.7
- Change all project from framework 4.0 to 4.5, found Azure cannot support 4.5, then change back to 4.0
- finally built and packaged
- Whole package works well before under Visual Studio 2010
- Whole solution works well in local as well
Pictures
pic1
Original web.config
file under site(1) Views folder
pic2
It's in .cspkg
package.
pic3
Check again from remote desktop
Final words
I know there's a solution is make site(1) empty, a dummy site, so whatever been changed will not matter. Or just load my backup and back to VS2010. But I do really really like to know how it got changed, and how to avoid it, thanks.