隐藏

HTTP Error 502.5 - Process Failure

发布:2022/4/11 13:52:28作者:管理员 来源:本站 浏览次数:1034

.net core 在iis部署遇到502错误:
HTTP Error 502.5 - Process Failure

Common causes of this issue:

    The application process failed to start
    The application process started but then stopped
    The application process started but failed to listen on the configured port

Troubleshooting steps:

    Check the system event log for error messages
    Enable logging the application process' stdout messages
    Attach a debugger to the application process and inspect

解决方案:

1、选中应用程序池-->高级设置-->加载用户配置文件设为true.

 

2、在Web.config中找到<aspNetCore processPath="dotnet" arguments=".\OpenAuth.WebApi.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />

把stdoutLogEnabled设置为true,在stdoutLogFile配置的文件夹logs下找到log文件,点开查看具体错误。我的是少了log4net.config配置文件,发布的时候没有生成,从源代码中拷贝过去就可以了