ASP.Net Core API - HTTP Error 405.0 - Method Not Allowed
I have created web api for delete in ASP.Net core C#, while I execute delete method in Postman (with method = DELETE ), I got below error...HTTP Error 405.0 - Method Not Allowed
<ul>
<li>The request sent to the Web server used an HTTP verb that is not allowed by the module configured to handle the request.</li>
<li>A request was sent to the server that contained an invalid HTTP verb.</li>
<li>The request is for static content and contains an HTTP verb other than GET or HEAD.</li>
<li>A request was sent to a virtual directory using the HTTP verb POST and the default document is a static file that does not support HTTP verbs other than GET or HEAD.</li>
</ul>
I found below solution after searching on internet and it is working fine for me.
I added below configuration in web.config file.
<system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules runAllManagedModulesForAllRequests="true"> <remove name="WebDAVModule"/> </modules> </system.webServer>
Hope, this will help to resolve your issue...
Enjoy !!!
:)
No comments:
Post a Comment