Deploy ASP.NET MVC 2 to IIS 7.5 targeting .NET 3.5

Posted by Agent_9191 on Stack Overflow See other posts from Stack Overflow or by Agent_9191
Published on 2010-05-24T19:54:26Z Indexed on 2010/05/24 20:01 UTC
Read the original article Hit count: 1360

Filed under:
|

I created an ASP.NET MVC 2 application in Visual Studio 2008. I set the release build to go through the ASP.NET compiler to precompile all the views, minify Javascript and CSS, clean up the web.config, etc. Since the production deployment is going to an IIS6 server, I set up my pseudo-production deployment on my Windows 7 machine to have the application pool run in classic mode targeting the 2.0 runtime. I set up the extensionless handler in the web.config that's necessary and everything worked great.

The problem came when I upgraded the solution to Visual Studio 2010. I'm still targeting the 3.5 framework, but now I'm using MSBuild 4.0 since that's what Visual Studio 2010 uses. Everything still compiles correctly because it runs fine under Cassini, but when I deploy it to the same location (same application pool, identity, etc) it now behaves differently. I still have the extensionless handler in the web.config, but now when I navigate to the root of the application it does directory browsing, and any routes that it had previously handled now come back as 404 errors being handled by the StaticFile handler in IIS. I'm at a loss for what changed and is causing the break.

I have looked at this question, but I have already verified that all the prerequisite components are installed.

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about iis7.5