在发布的项目文件夹中找到web.config文件,修改:
<aspNetCore processPath="dotnet" arguments=".\Cloud.Boss.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
为:
<aspNetCore processPath="dotnet" arguments=".\Cloud.Boss.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" >
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>