Method Not Allowed Error 405 Iis
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up “405 method not allowed” in IIS7.5 for “PUT” method up vote 50 down vote favorite 17 I use WebClient type to upload *.cab file to my server. On server side, I registered a HTTP handler for *.cab file with PUT method as below: But I always got a 405 method not allowed error, the response said the allowed methods are as below: Headers = {Allow: GET, HEAD, OPTIONS, TRACE Content-Length: 1293 Content-Type: text/html Date: Fri, 27 May 2011 02:08:18 GMT Server: Microsoft-IIS/7.5 X-Powered-By: ASP.NET} Even I explicitly allow the PUT method in the IIS Request Filtering for my web application, the same error still exists. Currently, I think this is a IIS related issue. Hope someone could shed some light on me. Thanks. iis iis-7 share|improve this question edited May 27 '11 at 2:33 asked May 27 '11 at 2:20 smwikipedia 12.1k40125255 add a comment| 12 Answers 12 active oldest votes up vote 74 down vote Sometimes you need to remove WebDAV from modules and from handlers of the system.webServer section. Here my suggested configuration: share|improve this answer edited Dec 4 '14 at 16:02 answered Feb 20 '13 at 9:57 Davide Icardi 5,68632945 Using the following MS article, I added the remove tag to handlers, but it still did not work. Thanks to your answer I see I also needed to add it to the modules section. Much appreciated. Here is the article: asp.net/web-api/overview/testing-and-debugging/… –Tod Birdsall Mar 17 '15 at 14:28 3 It works for me! –yanborowski Jul 17 '15 at 17:14 This one works for me ~!!! A
site will need to accept are GET, POST, PUT, DELETE. I had trouble getting my site to accept PUT and DELETE methods when hosting my site locally with IIS7. I am hosting the application under its own website, this lets me change the settings for the particular site using the IIS7 interface. Here are the steps I took to correct the problem: Begin in IIS7 by highlighting your website, then choosing Handler Mappings from the http://stackoverflow.com/questions/6147181/405-method-not-allowed-in-iis7-5-for-put-method available options: Then select WebDAV from the list of Mappings. Click Request Restrictions. Then switch to the Verbs tab and highlight All Verbs. Restart the application in IIS and hey presto! PUT and DELETE enabled (as well as all HTTP methods).If you want to more conservative about which methods are supported then use the option beneath All http://evolutionarydeveloper.blogspot.com/2012/07/method-not-allowed-405-on-iis7-website.html Verbs.This results in the changes to your Web.config.Inside your section goes this snippet: (You don't actually have to add this - IIS7 will have added this itself) Hope this will help someone out! P.s. I found WFetch to be quite a useful tool in debugging http requests. Posted by Nick Blair at 06:36 Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: 405, delete, http method, iis7, mvc4, not allowed, put, webapi 17 comments: Amit Prajapati11 October 2012 at 01:29very good.....ReplyDeleteESETV NOMAS23 April 2013 at 13:07http://betimdrenica.wordpress.com/2013/02/05/web-api-on-iis-8-0-405-method-not-allowed-for-put/ReplyDeleteAnonymous29 November 2013 at 09:22BrilliantReplyDeletedhaval Javiya14 February 2014 at 04:57nice one ...Thanx..ReplyDeleteAnonymous10 September 2014 at 03:58Fixed it for me. Thanks!ReplyDeleteAnonymous29 September 2014 at 05:44Thanks, the screenshots really helped!ReplyDeleteb.goyal2329 October 2014 at 04:01 ReplyDeleteb.goyal2329 October 2014 at 04:02 ReplyDeleteLyman Zerga12 November 2014 at 19:50Thank you for this!ReplyDeleteRajesh30 March 2015 at 16:34Thanks - the screenshots were tremendously useful.ReplyDeleteAnonymous28 April 2015 at 03:44This is not the best way. See here: http://stackoverflow.com