I published a .NET Core Web API through FTP.
By default, some of the methods weren't working(put and delete), because the server has WebDAV enabled as default.
To remove this, after publishing the application I have to manually go to web.config on FTP and add the following lines
<modules runAllManagedModulesForAllRequests="false">
<remove name="WebDAVModule" />
</modules>
How would one go about it setting it up to be removed automatically - I assume through Startup.cs
Right click WebDAV and select Remove. Navigate back to the product site. Double-click the Modules item. Right click WebDAVModule and select Remove.
You only need to add web.config file to your API, and then when you publish automatically it will take your web.config.
You have to remove WebDAVModule from iis server.
Steps:
PUT and DELETE requests should now work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With