1

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 under Views of site/1 has been changed.
  • File is not been replaced, is been edited, only change is 2.0.0.0 -> 1.0.0.0 and 4.0.0.0 to 3.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 enter image description here

pic2 It's in .cspkg package. enter image description here

pic3 Check again from remote desktop enter image description here

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.

Community
  • 1
  • 1
Eric Yin
  • 8,737
  • 19
  • 77
  • 118
  • 1
    How are you deploying? Are you sure your deployments are actually working? (Have you tried making some other change and seeing if that one "takes"?) I'm pretty sure Windows Azure itself doesn't edit the package's content during deployment, but I suppose IIS could do something. I'm instead betting that the package you're looking at just isn't getting deployed. – user94559 Aug 19 '12 at 00:05
  • I create a .cspkg package, then visit https://manage.windowsazure.com/ and choose upload to deploy. Yes, the deploy works, all other sites works, `site/1` will work if I change above file back. And I mentioned in post, the `web.config` file itself does not been replaced by default, all my `namespace` settings still there, just the version number been changed. – Eric Yin Aug 19 '12 at 08:05
  • My `WebRole.OnStart()` has code to change each IIS `IdentityType` to `ProcessModelIdentityType.LocalSystem` will this cause the change? – Eric Yin Aug 19 '12 at 08:13
  • 1
    I don't know. Have you tried commenting out that code to see if it helps? – user94559 Aug 19 '12 at 16:20
  • I create a dummy site as site(1), problem solved – Eric Yin Aug 19 '12 at 16:55

0 Answers0