问题描述
SO中还有许多与此类似的其他问题,我仍在此发布,因为这些问题都不适合我的环境.
There are many other questions similar to this in SO, i am still posting here because none of them are working out for my environment.
我得到的确切错误是
HTTP错误403.14-禁止Web服务器配置为不列出此目录的内容.
HTTP Error 403.14 - ForbiddenThe Web server is configured to not list the contents of this directory.
在IIS中启用目录浏览完全没有帮助.
Enabling Directory browsing in IIS doesn't help at all.
还尝试在IIS处理程序映射中的ExtensionLessUrlHandler-Integrated-4.0中添加所有动词.
Also tried adding adding all verbs in ExtensionLessUrlHandler-Integrated-4.0 in IIS Handler mappings.
并且还尝试删除配置中的模块WebDAVModule和WebDAV处理程序,如下所示.
And also tried removing module WebDAVModule and WebDAV handler in config as shown below.
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
</system.webServer>
提前感谢您的回答!
推荐答案
如果仍然有人遇到此问题,我可以通过在配置文件中添加以下几行来解决此问题:
If anyone is still facing this issue, I got it resolved by adding the lines below in my config file:
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true" />
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
这篇关于IIS 7.5和Windows Server 2008 R2中托管的Web API 2提供了403.14的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!