I have a web service which I host on my machine. I use Windows 7 and IIS 7.5.
Problem: When the client tries to consume the web service, he/she gets a HTTP 405 error.
In the log file of IIS, I can see that this is refused because POST verb is not allowed.
Question: How can I allow POST verb for those requests?
Do I have to add mapping of the WSDL file? And if I do, how do I have to configure this mapping? I have checked, and in existing mappings I have nothing for WSDL extension.
Is there maybe another thing to setup on IIS to allow those requests?
Web service is built using WCF.
If you don't need to use WebDAV, then the easiest and the best way to fix "405 method not allowed" issue is to remove WebDAV from your system. You can easily get this done in "Turn Windows Features On or Off" simply un-ticking the checkbox.
The 405 Method Not Allowed error occurs when the web server is configured in a way that does not allow you to perform a specific action for a particular URL. It's an HTTP response status code that indicates that the request method is known by the server but is not supported by the target resource.
The error message "HTTP Error 405.0 - Method Not Allowed" means that the request was sent to a page that can't handle a POST request.
The listed answer didn't work for me, but I was able to fix the problem by running
"%WINDIR%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r
This re-registered the handler mapping for *.svc
After hours of struggling, this is final solution that helped me (tested from fiddler):
End voila, fiddler no longer answers with 405 but with happy 200.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With