NETCore项目报错 An error occurred while starting the application

部署项目到IIS,运行时报错误: An error occurred while starting the application

打开web.config找到stdoutLogEnabled="false",把该值改为true,即->stdoutLogEnabled="true"

<?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="dotnet" arguments=".\CMS.WebApi.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
    </system.webServer>
  </location>
</configuration>

可看到对应的报错信息。

猜你喜欢

转载自www.cnblogs.com/qlgbk/p/12720391.html