【问题标题】:Publishing MVC3 app to IIS error - The Web server is configured to not list the contents of this directoryPublishing MVC3 app to IIS error - Web 服务器配置为不列出此目录的内容
【发布时间】:2012-04-22 21:10:33
【问题描述】:

我将我的网站发布到“C:\inetpub\wwwroot\Sem_App”并创建了一个物理路径为“C:\inetpub\wwwroot\Sem_App”和端口 84 的网站。当我在 http://localhost:84/ 上浏览网站时,我得到了以下错误。

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

无论如何我都不想列出目录的内容,我想运行以前在 VS 2010 的调试模式下运行的默认页面。有人知道发生了什么吗?

我尝试运行此命令并重新启动 iis 但它不起作用 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

【问题讨论】:

    标签: visual-studio-2010 iis iis-6 publishing-site


    【解决方案1】:

    去 cmd 输入这个,你就可以开始了 %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

    windir 通常是 C:\Windows

    【讨论】:

      【解决方案2】:

      您可能需要在 IIS 中启用directory browsing option。查看以下链接,了解如何将 ASP.NET MVC 部署到 IIS 6。(对于 .Net 4.0

      http://www.codefrenzy.net/2011/10/19/deploying-asp-net-mvc-3-to-iis-6/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-04-06
        • 1970-01-01
        • 2017-09-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多