Recently, I am a bit interested in the deployment of ASP.NET MVC application on IIS6 because Phil Haack just posted an easier way to deploy ASP.NET MVC application on ASP.NET 4. So I decided to see how different version of ASP.NET MVC works on different version of ASP.NET.

First off, I created an ASP.NET MVC 2 project in Visual Studio 2010 and deploy it to IIS 6 on Windows Server 2003 (only .NET framework 3.5 installed). I set the application to run in ASP.NET 2.0 and no extra stuff. Because I just wanted to see what sort of error would occur. And as expected, some error was reported as following.



Then, I set the Copy Local attribute of System.Web.Mvc assembly to true as following and deploy again.


As a result, the application ran smoothly.



I had read tons of materials talked about the mess of deploying MVC application on IIS 6. And I did fight to tackle the deploying issues in my previous project. At least, if had used Extensionless Url in your application, you should have configured wildcard mapping in IIS. But in this case, I even didn’t have chance to do so.


What the heck was going on exactly? Did I discover a new continent?

 posted on 2011-01-29 17:32 助平君 阅读(...) 评论(...) 编辑 收藏