您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

在IIS 7.5中托管的Web Api中找不到HTTP 404页面

在IIS 7.5中托管的Web Api中找不到HTTP 404页面

我也在为此而苦苦挣扎。幸运的是,史蒂夫·米歇洛蒂(Steve Michelotti)在这里记录了一个我有用的解决方案。

最终,我在Web配置中为ExtensionlessUrlHandler-Integrated-4.0处理程序启用了所有动词(verb =“ *”)。

<system.webServer>
    <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>
</system.webServer>

其他人指出,启用WebDAV会导致问题。幸运的是,我也没有遇到这个问题。

其他 2022/1/1 18:17:15 有349人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶