Supporting HTTP PUT and DELETE Methods for ASP.NET MVC in IIS
To enable HTTP PUT and DELETE methods in ASP.NET MVC applications hosted on IIS, it's essential to make specific configurations in IIS.
Enable PUT and DELETE in Handler Mappings
Navigate to Handler Mappings in IIS Manager and locate "ExtensionlessUrlHandler-Integrated-4.0." Double-click on it and click on "Request Restrictions..." On the Verbs tab, add both DELETE and PUT.
Possible WebDav Publisher Issue
In cases where DELETE requests still fail, check if the WebDAV Publisher role is enabled on the server. If the server is running on Windows 2008, disable the WebDAV role or remove the WebDAVModule setting from the web.config file in the
<system.webServer> <modules> <remove name="WebDAVModule" /> </modules> <handlers> <remove name="WebDAV" /> </handlers> </system.webServer>
The above is the detailed content of How to Enable HTTP PUT and DELETE Methods in ASP.NET MVC on IIS?. For more information, please follow other related articles on the PHP Chinese website!