|
Everyone is familiar with configuring websites in IIS, and I don't think there are many brothers who don't, but when configuring asp.net MVC, there will be some problems. I will record the problems I encountered during the configuration for your reference. My unit's server is Windows 2003 system, IIS6
Directory Listing DeniedThis Virtual Directory does not allow contents to be listed.
This is because you are missing a dll file, Select Site - > Properties -> Home Directory -> Configuration -> Mapping
Insert the Wildcard Application Mapping below in the selection
C:WINDOWSMicrosoft.NETFramework2.0.50727aspnet_isapi.dll Note here that
Confirm if the file exists this checkbox, never select why. Because in the IIS 6,7 version, he doesn't recognize the path settings in our Routing
We generally are - public static void RegisterRoutes(RouteCollection routes)
- {
- routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
- routes.MapRoute(
- "Default", // Route name
- "{controller}.aspx/{action}/{id}", // 大家看好,如果你选择了上面的复选框,这里你就得加上文件的扩展名,不然的话,会提示你,文件不存在
- new { controller = "Home", action = "Index", id = ""}// Parameter defaults
- );
Copy codeJust change the above program mapping dll to .NET 4.0!
|