By default, the PATCH, PUT, and DELETE methods are handled by the WebDAV module on our Windows servers.
To allow these methods to be processed by another module, you need to disable WebDAV.
Disable WebDAV
Disabling WebDAV is done through the web.config file.
If this file does not yet exist in your hosting directory, you can simply create it.
Example of a new web.config file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
</system.webServer>
</configuration>
Allowing Methods/Verbs in the ASP.NET Handler
Next, you need to allow the methods (verbs) in the ASP.NET handler.
This requires adding a few additional lines to your web.config file.
Example of a newly created configuration file including disabled WebDAV:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" runManagedModulesForWebDavRequests="true" >
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
</configuration>
