I have a similar problem, but Webdav is not installed.
My error is "401 - Unauthorized: Access is denied due to invalid credentials. + You do not have permission to view this directory or page using the credentials that you supplied"
This happen ONLY on DELETE & PUT verbs, GET etc is working fine.
I use IIS7 on Windows 2008 server, my application is in the Asp.Net V4.0 (integrated) pool.
On the default web site level and application level, all the default handlers for *svc listed allow "all verbs".
I'm unsure which handler is the correct one (I assume "svc-Integrated-4.0" that use type "System.ServiceModel.Activation.ServiceHttpHandlerFactory"?), so tested all listed anyway.
If I set a handler not to use all verbs and enter them manually, I can see the "<handlers>" section appear in the applications web.config and settings look ok.
I tested the requestFiltering settings as well and were able to allow/disallow GET verbs, but it has no effect on my DELETE verb exception.
I had to enable form authentication in IIS application level to get PUT/DELETE working. (GET worked before without that)
Strange, but there is no web.config FORM authentication specified. I was under the understanding that Windows is the default mode used when not specified... ?
I have similar error of 405. But unfortunately I don't know how to enable detail error page in IIS 7.5. I only get the message like this: Server Error 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. I am using webClient class to upload a zip file on remote server, and getting the above error. WebDAV is already there, If I enable it, I get 401 - Unauthorized access error and if I am disable
it I am getting the 405 error. What should I do to get rid of this situation? I have wasted hours on this error. Same code is running fine on IIS 6.0 if I enable WebDAV under "Web Service Extensions" node of IIS 6.0. Please help. Girish
I was also hitting a consistent 401 error when ever I was trying the use the PUT or DELETE verbs in IIS7 with an ODATA service. In my case this was on an anonymous site and I finally discovered that these verbs will be blocked by default in IIS7 when no authentication
mode is provided. By default, the IIS7 authentication mode is Windows, and as I had no user, it was throwing the 401 error for these verbs. (At least I think that was the general issue) Setting the ASP.NET authentication mode to None resolved my issue. SEE:
http://msdn.microsoft.com/en-us/library/aa291347(v=VS.71).aspx
nikhilthaker
5 Posts
How to enable PUT and DELETE verbs on IIS 7
Mar 19, 2010 05:43 AM|LINK
Hi,
I am completely a newbie in working with IIS and so I don't know even that I am writing this post in the correct section of the forum or not.
I have just seen the video by Henrik Frystyk Nielsen from PDC 09 on developing Rest Applications with .Net framework.
So I have just created a new project with downloading "WCF REST Service Application" template.
Using this template, there are already couple of auto generated methods which are using PUT and DELETE verbs which are not working for me.
I am using Fiddler to create request over IIS 7.
Through fiddler GET and POST verbs are working fine but when i use the PUT or DELETE one it shows the error 405 "Method not Allowed".
I am working on Windows 7 Ultimate 64 bit and it uses IIS 7 (which is by default I suppose, I have just enable the IIS from "Add or Remove Programs").
I have tried to enable them from "Request Filtering", but that is not working.
So anyone please let me know how to enable PUT and DELETE verbs in IIS 7.
Thanks,
Nikhil Thaker (MCTS - ASP.NET 3.5)
IIS 7.0 Verbs in IIS PUT DELETE
eokim
172 Posts
Microsoft
Re: How to enable PUT and DELETE verbs on IIS 7
Mar 19, 2010 06:26 AM|LINK
Here is a few troubleshoot.
1. Make sure REST service application's handler is in <handlers/> section and it is supposed to set to accept PUT and DELETE verbs.
2. Enable Failed Request Tracing and check who throws 405.
3. In case WebDAV is installed, you should 1) uninstall it from the box to use RESTfull service, or 2) remove WebDAVModule from <modules/> in site.
Let me know whether it helps.
nikhilthaker
5 Posts
Re: How to enable PUT and DELETE verbs on IIS 7
Mar 19, 2010 10:56 AM|LINK
Here are the images of Http error in Fiddler with DELETE verb and my web.config file.
1.> Http error in fiddler
2.> My application's web.config
It would be good if you can help with these images.
Thanks.
eokim
172 Posts
Microsoft
Re: How to enable PUT and DELETE verbs on IIS 7
Mar 19, 2010 10:20 PM|LINK
Yes, 1) indicates WebDAV module throws 405. You should uninstall it in order to use RESTFull.
Unfortunetly, they share common http verb and similar protocol.
The reason why WebDAV throws 405 is that it claims to process the request, but site is not configured to process it.
straatvark
2 Posts
Re: How to enable PUT and DELETE verbs on IIS 7
Jun 29, 2010 09:35 AM|LINK
Hi,
I have a similar problem, but Webdav is not installed.
My error is "401 - Unauthorized: Access is denied due to invalid credentials. + You do not have permission to view this directory or page using the credentials that you supplied"
This happen ONLY on DELETE & PUT verbs, GET etc is working fine.
I use IIS7 on Windows 2008 server, my application is in the Asp.Net V4.0 (integrated) pool.
On the default web site level and application level, all the default handlers for *svc listed allow "all verbs".
I'm unsure which handler is the correct one (I assume "svc-Integrated-4.0" that use type "System.ServiceModel.Activation.ServiceHttpHandlerFactory"?), so tested all listed anyway.
If I set a handler not to use all verbs and enter them manually, I can see the "<handlers>" section appear in the applications web.config and settings look ok.
I tested the requestFiltering settings as well and were able to allow/disallow GET verbs, but it has no effect on my DELETE verb exception.
Any advice would be much appreciated.
straatvark
2 Posts
Re: How to enable PUT and DELETE verbs on IIS 7
Jun 29, 2010 12:51 PM|LINK
My issue is sorted.
I had to enable form authentication in IIS application level to get PUT/DELETE working. (GET worked before without that)
Strange, but there is no web.config FORM authentication specified. I was under the understanding that Windows is the default mode used when not specified... ?
girish128
1 Post
Re: How to enable PUT and DELETE verbs on IIS 7
Mar 03, 2011 09:07 AM|LINK
IIS 7.5 PUT 405
iguanaware
1 Post
Re: How to enable PUT and DELETE verbs on IIS 7
May 04, 2011 09:05 PM|LINK
Remove WebDav from "Modules" and from "Handler Mappings"
Modules:
WebDAVModule, %windir%\System32\inetsrv\webdav.dll, Native, Inherited
Handler Mappings:
WebDAV, *, Enabled, Unspecified, WebDAVModule, Inherited
Then Restart IIS
It results in a Web.Config change of:
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
</system.webServer>
-Brian Freeman
DELETE WebDAV 405 OData
David Glaubm...
1 Post
Re: How to enable PUT and DELETE verbs on IIS 7
Jun 24, 2011 12:50 AM|LINK
Thanks, this fixed my problem and clarified what was going on.
David
kgolding
5 Posts
Re: How to enable PUT and DELETE verbs on IIS 7
Sep 08, 2012 02:37 AM|LINK
Verbs in IIS PUT DELETE 401 OData datajs