ASP.NET Core with IIS - HTTP Verb Not Allowed ASP.NET Core with IIS - HTTP Verb Not Allowed asp.net asp.net

ASP.NET Core with IIS - HTTP Verb Not Allowed


After hours of research and trial and error, the fix seems to be pretty simple. Add a Web.config file to your .NET Core 2.0 application:

<?xml version="1.0" encoding="utf-8"?><configuration>    <!-- To customize the asp.net core module uncomment and edit the following section.          For more info see https://go.microsoft.com/fwlink/?linkid=838655 -->    <system.webServer>        <modules>            <remove name="WebDAVModule" />        </modules>        <handlers>            <remove name="aspNetCore" />            <remove name="WebDAV" />            <!-- I removed the following handlers too, but these                 can probably be ignored for most installations -->            <remove name="ExtensionlessUrlHandler-Integrated-4.0" />            <remove name="OPTIONSVerbHandler" />            <remove name="TRACEVerbHandler" />            <add name="aspNetCore"                  path="*"                  verb="*"                  modules="AspNetCoreModule"                  resourceType="Unspecified" />        </handlers>        <aspNetCore processPath="%LAUNCHER_PATH%"                     arguments="%LAUNCHER_ARGS%"                     stdoutLogEnabled="false"                    stdoutLogFile=".\logs\stdout" />    </system.webServer></configuration>

Hope this helps.


This was what worked for me (netcore 2.0)

<system.webServer>  <modules runAllManagedModulesForAllRequests="false">    <remove name="WebDAVModule" />  </modules></system.webServer>