I have a webapi 2.0 which I am publishing using ftp to my windows 2012 server running IIS 8.5.
I ran into an issue which I can resolved using this link here;
Error 405 – Methods not Allowed in ASP.NET Core PUT and DELETE requests
so by adding;
<modules runAllManagedModulesForAllRequests="false">
<remove name="WebDAVModule" />
</modules>
I can fix my PUT and DELETE issues, however whenever I publish I am having to physically edit the web.config to reflect the addition of the above code?
Can anyone tell me how to automatically add this when I publish using ftp with web deploy?
My program.cs has the default build in it;
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build();
web.config, then I execute it as a pre-publish target.web.configisn't really part of ASP.NET Core, it's just there for IIS compatibility. I get the impression it wasn't meant to be edited.