Deploy ASP.NET MVC application under IIS 6

  

When deploying ASP.NET MVC application under IIS6, it is directly set to handle all requests to ASP.NET's ISAPI. MVC is based on ASP.NET. The framework defaults to check whether there is a physical file on the physical path for any request. If it exists, it does not pass the MVC routing mechanism. Otherwise, the route is taken.

Therefore, if you do not consider controlling the static resource permissions, you can set the static resources not through the ASP.NET ISAPI, but directly by IIS, in this way to improve some performance. This article focuses on this topic and details the deployment process.

0. When designing the MVC website, put the static resources in a folder, suggest that the directory structure use lowercase letters

1. Publish the web application to a certain path. (Omitted) (By the way, MVC2 is weaker than MVC3, and there are very few components that can be used to deploy System.Web.Mvc directly; but MVC3 has introduced Razor engine and increased dependencies due to its increased functionality. It is recommended to install MVC3 directly during deployment.

2. Create a web site (omitted)

3. Right-click on the created web site, select Properties, and switch to the Home Directory page

4. Click Configuration. In the Wildcard application maps, click Insert, add C:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319\\aspnet_isapi.dll, and uncheck Verify that file existsg. (If you use MVC2, you can go to 2.0 to find this dll. It is the key to remove the verification of static files, which makes asp.net handle all requests)

5. Click OK

6. ASP.NET 4.0 allows extension

7.content static resource directory is disposed the directory, the content directory is provided directly by the IIS request processing to improve performance. Right click on content, properties



Copyright © Windows knowledge All Rights Reserved