【发布时间】:2020-10-08 13:53:23
【问题描述】:
我有一个dotnet core 3.1 应用程序托管在IIS 下,所以环境变量设置如下:
<?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=".\MyApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="OutOfProcess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
<environmentVariable name="ASPNETCORE_URLS" value="https://dev.mycompany.com/MyApp" />
<environmentVariable name="LOCAL" value="false" />
</environmentVariables>
</aspNetCore>
</system.webServer>
</location>
</configuration>
当抛出错误时,我会看到:
鉴于应用程序部署在 IIS 下,我该怎么做才能显示实际异常?
【问题讨论】: