- 2 minutes to read

HTTP Error 405.0 - Method Not Allowed


Information

If WebDAV is installed and if you get a 405 error on edit (Update/Delete) of any resource in the WebAPI or WebClient. You may use the solution described in this article to solve the problem, You can do this for the whole Web Site (usually named Default Web Site) if this is OK, or you have to do it for each Nodinite Application within IIS.

Example error message as shown in the WebClient

png_WebClientUnknownError

Full error message

png_WebDAVModuleMethodNotAllowed

Solution

Remove WebDav from Modules and from Handler Mappings in IIS
png_IISHome

Modules

png_ModuleWebDAVRemove

Handler Mappings

png_HandlerWebDAVRemove

Note

Restart IIS or Recycle the Application pool after this operation

The web.config file for WebAPI and WebClient should include the following exclusions:

...
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="WebDAVModule" />
    </modules>
    <handlers>
      <remove name="WebDAV" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
      <remove name="BlockViewHandler" />
      <add name="BlockViewHandler" path="*" verb="Views/*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
    </handlers>
  </system.webServer>
...

Note

The system.webServer example is partial.


Web Client
Web API