Development environment: win7+iis7+vs2008 sp1+asp.net MVC 2.0 RC
Before deploying an MVC application, make sure that your Program Bin folder contains System.Web.Mvc.dll (very important) below, as shown in the figure:
If not, open the list of references in your MVC project, as shown in:
Right-click SYSTEM.WEB.MVC, select "Properties", go to the following window:
Set Copy Local to True (the default is False), and then build the project, and System.Web.Mvc.dll will appear under the Bin folder.
First talk about the IIS7 environment that is easiest to deploy:
Mine is the Win7 system, where Win7 is integrated with the IIS7 version, it is easy to deploy ASP.net MVC 2.0 programs on Win7, as long as the site's application pool is set to "integrated".
(In fact, IIS7 below the site, the application is the default integration method, that is, IIS7 above the MVC site, the default support)
After you select the integration method, you can see the configuration entries for "*.mvc" in the "handler mappings" of the functional View:
This allows you to run the MVC program.
Next, let's talk about the configuration of IIS6 on WIN03:
Build a site on IIS6, and then in the site properties, "Home directory"-"Configuration", will open the following window:
Insert a map in the "Wildcard Application Mappings" below, which the executable file is given. NET "Aspnet_isapi.dll", the default address is generally "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll"
To this end, IIS6 's integrated MVC is complete.
Finally, if your project bin below System.Web.Mvc.dll, the above configuration is certainly not successful, if the System.Web.Mvc.dll file is in the project's Bin folder.