HTTP 错误 403.14 - 禁止 - Web 服务器配置为不列出此目录的内容 [英] HTTP Error 403.14 - Forbidden - The Web server is configured to not list the contents of this directory

查看:35
本文介绍了HTTP 错误 403.14 - 禁止 - Web 服务器配置为不列出此目录的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在 Visual Studio 2012 中创建了一个新的空网站并单击了运行(即在浏览器中查看),但出现此错误:

I just created a new empty website in Visual Studio 2012 and clicked on run (i.e view in browser) and I get this error :

HTTP 错误 403.14 - 禁止Web 服务器配置为不列出此目录的内容.

我进入 IIS 并单击目录浏览,然后确保启用了目录浏览,但我仍然收到此错误.我想不通?

I went into IIS and clicked on Directory browsing and then ensured that Directory browsing was enabled but I still get this error. I can't figure it out ?

我刚刚创建的网站项目没有列在 IIS 管理器的默认网站中,我认为这很奇怪.

The website project I just created is not listed in Default web sites in IIS Manager which I thought was odd.

我如何摆脱这个错误?

推荐答案

将其保留到您的 Web 配置文件中,然后重命名 add value="yourwebformname.aspx"

keep this into your web config file then rename the add value="yourwebformname.aspx"

<system.webServer>
    <defaultDocument>
       <files>
          <add value="insertion.aspx" />
       </files>
    </defaultDocument>
    <directoryBrowse enabled="false" />
</system.webServer>

其他

<system.webServer>
    <directoryBrowse enabled="true" />
</system.webServer>

这篇关于HTTP 错误 403.14 - 禁止 - Web 服务器配置为不列出此目录的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆