Click here to Skip to main content
15,900,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
405 - HTTP verb used to access this page is not allowed.


The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.


What I have tried:

I tried by changing the filters in IIS but shows the same error
Posted
Updated 3-Jul-18 5:29am
Comments
CHill60 3-Jul-18 7:13am    
We can't see your code! Share the code that is causing the error
Kornfeld Eliyahu Peter 3-Jul-18 7:28am    
Check this: https://forums.iis.net/t/1201030.aspx?405+HTTP+verb+used+to+access+this+page+is+not+allowed+
Kornfeld Eliyahu Peter 3-Jul-18 7:28am    
If you have WebDAV installed - remove it...
Member 11416690 3-Jul-18 8:14am    
I didn't installed WebDAV

1 solution

This error is due security config in IIS when you try to call services with DELETE and PUT HTTP verbs.

Try this in your web.config :

XML
<system.webServer>
    <httpProtocol>
      <customHeaders>
        <add name="Access-Control-Allow-Origin" value="*" />
        <add name="Access-Control-Allow-Headers" value="authorization, accept, content-type" />
        <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
      </customHeaders>
    </httpProtocol>
    <handlers>
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
  </system.webServer>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900