zoukankan      html  css  js  c++  java
  • MVC 5 on Windows Server 2008/IIS 7

    将网站部署在2008上,结果出现了

    HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.

    我实在不知道这TM是什么鬼。

    http://cdonner.com/mvc-5-on-windows-server-2008iis-7.htm 

    这个链接是原博客,以下说的是这个博客的意思。

    正如这个博主所言,google了半天全是说要加上

    <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"></modules>
    </system.webServer>
    

     实际上这句话完全不是这么个意思。当然这一段话也不是随便乱加的。具体原因直接MSDN文档就很清楚了。

    这里贴上一个反例:http://www.bubuko.com/infodetail-610089.html   这个博主就是不看文字,只看代码。

    Donner的意思是这个:将如下模块上的checkbox去掉。让它由继承变成本地

    然后。。。。。然后就木有然后了,就OK了。鬼知道为什么要变成本地。

    就在变成本地后,webconfig里自动多了如下配置:

        <modules>
                <remove name="UrlRoutingModule-4.0" />
    	  <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition=""></add>
        </modules>
    

      

    贴出来以备核查。

    这真是一个让人崩溃的问题。期待有人来告诉我why。

  • 相关阅读:
    Flask、Vue部署总结
    Recat教程(二)
    C第一个程序
    React教程(一)
    Flask+uwsgi+nginx 部署
    使用Dockerfile部署简单的应用
    Typescript搭建开发环境
    Typescript模块化/命名空间/装饰器
    Typescript的泛型/泛型接口
    修改git密码后,终端fatal: Authentication failed for'http://xxx/xxx.git'
  • 原文地址:https://www.cnblogs.com/crazyghostvon/p/server2008mvc540314.html
Copyright © 2011-2022 走看看