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