[英]405 - HTTP verb used to access this page is not allowed. [IIS 8.5] [Windows Server 2012 R2]
I have got a new iis server and from a while i am finding solution for error :我有一个新的 iis 服务器,有一段时间我正在寻找错误的解决方案:
405 - HTTP verb used to access this page is not allowed.
405 - 不允许用于访问此页面的 HTTP 动词。 The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
您正在查找的页面无法显示,因为尝试访问时使用了无效方法(HTTP 动词)。
I have seen below solutions:我已经看到以下解决方案:
1. 1.
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
</system.webServer>
2. IIS Settings http://www.somacon.com/p126.php 2. IIS设置http://www.somacon.com/p126.php
Solution 1, causes Internal server error and later unable to find the solution.解决方案1,导致内部服务器错误,后来找不到解决方案。 Solution 2, i am unable to find Property window in iis 8.5, so unable to try the same.
解决方案 2,我在 iis 8.5 中找不到属性窗口,因此无法尝试。
Please help请帮忙
I also had the same internal server error when attempting the first solution, described at HTTP 405 error with Web API .在尝试第一个解决方案时,我也遇到了相同的内部服务器错误,在HTTP 405 error with Web API 中进行了描述。 Since I wasn't even using WebDAV, I opted to remove it entirely from IIS (see screenshot below).
因为我什至没有使用 WebDAV,所以我选择从 IIS 中完全删除它(见下面的截图)。 After a required server restart, the problem was resolved.
需要重新启动服务器后,问题就解决了。
One of my colleague helped me out.我的一位同事帮助了我。 I was missing some of the major iis features.
我错过了一些主要的 iis 功能。
Goto Add Roles and Features Wizard, then Web Server (IIS)> Web Server > Application Development > Select ASP.net 3.5 and Asp.net 4.5 and click Install.转到添加角色和功能向导,然后 Web 服务器 (IIS) > Web 服务器 > 应用程序开发 > 选择 ASP.net 3.5 和 Asp.net 4.5,然后单击安装。
Goto cmd prompt and iisreset.转到 cmd 提示符和 iisreset。
For WCF service, Kindly check Http Activation under WCF Services.对于 WCF 服务,请检查 WCF 服务下的 Http 激活。
Hope this may help you and save your time.希望这可以帮助您并节省您的时间。
This is late but may help some other guys.这已经晚了,但可能会帮助其他一些人。 My application is WEB-API dotnet Core face same problem when deploy on local server resolve this by doing following steps.
我的应用程序是 WEB-API dotnet Core 在本地服务器上部署时面临同样的问题,通过执行以下步骤解决此问题。
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule"/>
<!-- add this -->
</modules>
<handlers>
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
<remove name="TRACEVerbHandler" />
<remove name="OPTIONSVerbHandler" />
<remove name="WebDAV" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<add name="aspNetCore" path="*" verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
</handlers>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.