首页 > 技术文章 > IIS站点无法访问..点浏览IIS窗口直接关掉

iiwen 2015-04-24 14:08 原文

呃..其实这个问题很简单..

大家可以先看这位大婶写的博文..

http://blog.csdn.net/chenguang79/article/details/7220232

如果网站一访问IIS就挂掉。。就访问上边的地质

也很有可能是站点的.net版本选择的不对..请检查..

 

 

另外..如果你的MVC站点配置完成后访问显示.

 

Directory Listing Denied

This Virtual Directory does not allow contents to be listed.

 

选择网站 - > 属性 -> 主目录 -> 配置 -> 映射

 

 

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll

 

 

这里注意一点,

        

       确认文件是否存在 这个复选框,千万不要 选择,为什么呢.因为在IIS6,7的版本中,他不认我们Routing中的路径设置

      我们一般是都是

 

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                    
     );       

 

你不会是想按上边的方式配置你的MVC路由吧?

推荐阅读