Sunday 28 August 2016

[Solved] HTTP Error 405 Method not allowed The HTTP verb used to access this page is not allowed


Method Not Allowed

The HTTP verb used to access this page is not allowed.




I was posting data to a default directory page http://www.asptricks.net/api/ and regularly getting 405 method not allowed.
I found its clearly mention on https://support.microsoft.com/en-us/kb/216493, BUG: You may receive an HTTP 405 "Method not allowed" error message when you browse the default document without specifying the file name.

Solution 1:
So i got hint to solve this problem, i guess if i will change my URL as http://www.asptricks.net/api/default.aspx it will work.
And yes it worked.


But the challenge here is i gave the http://www.asptricks.net/api/ to other application which worked on few protocol and ask him to change URL was tough for me because they take
about 2 week to do it. So finally i changed few thing in my application and it worked

Solution 2:
I used URL rewrite and redirected the http://www.asptricks.net/api/ to other page http://www.asptricks.net/api/myresponse.aspx
And it worked.