0

I have a build process where I deploy my website in release mode to the staging environment and apply appropriate web.config transforms in the process, however my deployed website, complete with all files (I double checked that they were there) returns a 404 for all non-static-file requests, unless I put debug="True" back into the <compilation> element of the web.config file. As soon as I do that, the website starts working. Why would removing this attribute cause http 404 errors?

UPDATE

I have determined that this is unrelated to the deployment process. On my local machine, just using Visual Studio 2010, compiling my application in release mode and removing debug="true" from the web.config file (i.e. compiling views without debug symbols) causes all routing to fail, with all requests returning 404.

Nathan Ridley
  • 33,766
  • 35
  • 123
  • 197
  • http://stackoverflow.com/questions/705229/diagnosing-404-errors-on-iis-7-and-asp-net-mvc – Tomas Voracek Mar 25 '12 at 18:50
  • You say you have a "build process", does that mean you're not using the VS Publish feature, and doing it yourself? If so, then you are likely doing something wrong in your process. – Erik Funkenbusch Mar 25 '12 at 18:51
  • @Tomas - yes I'm running integrated mode - remember enabling debug=True" causes the site to magically start working. I'm on IIS7 (Windows Web Server 2008, Service Pack 2) – Nathan Ridley Mar 25 '12 at 19:16
  • @Mystere Man - I am deploying with Team City 7 using an MSBuild script that copies the deployable files (cshtml, js, css, bin, etc) to the staging folder, along with a transformed config file. – Nathan Ridley Mar 25 '12 at 19:21
  • Try changing other things in web.config, ie adding empty line and save. Still same? Then it has to do with pool recycle because of web.config edit. I do not think that there is problem with debug=true or false. Please confirm. – Tomas Voracek Mar 25 '12 at 21:11
  • It could be an issue with a 3rd party library you are using, as I had a similar issue with a Telerik control before they fixed the bug in a later version. – dimoss Mar 26 '12 at 04:49

0 Answers0