.netCoreApi5.0+部署iis站点webconfig配置 HTTP 错误 500.24 - Internal Server Error的解决方法

 

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\PLCSYS.APi.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
      <environmentVariables>
        <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
      </environmentVariables>
    </aspNetCore>
    </system.webServer>
  </location>
</configuration>

保存为web.config放到iis根目录即可!

posted @ 2023-11-07 16:58  一只奋斗的小小鸟  阅读(93)  评论(0编辑  收藏  举报