baget 部署 iis put推送 MethodNotAllowed 405报错

需要在webconfig中加上WebDAVModule和WebDAV的配置,总的配置如下,重启IIS站点即可:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
        <modules>
        <remove name="WebDAVModule" />
    </modules>

      <handlers>
       <remove name="WebDAV" />
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\BaGet.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>

作者:spike

分类: Net

创作时间:2024-11-28

更新时间:2024-12-09

联系方式放在中括号之中例如[[email protected]],回复评论在开头加上标号例如:#1