admin 发表于 2024-1-5 15:56:56

Development Mode Swapping to Development environment

Development Mode Swapping to Development environment will display more detailed information about the error that occurred. The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users.

NET8发布时发生,方法:
修改web.config

<?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=".\Hondy.Chat.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout">
      <environmentVariables>
         <environmentVariable name="ASPNETCORE_ENVRONMENT" value="Development" />
      </environmentVariables>
      </aspNetCore>
    </system.webServer>
</location>
</configuration>
页: [1]
查看完整版本: Development Mode Swapping to Development environment