在使用iis托管net5的程序时访问报错,以下是具体错误信息
HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure
Common solutions to 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
For more information visit:
https://go.microsoft.com/fwlink/?LinkID=808681
百度了很多解决方案都没有解决。
解决办法
必备的:安装net5的环境及运行时包
可在微软官网下载:
再打开cmd以管理员身份执行:
安装AspNetCoreModule托管模块后执行
net stop was /y
net start w3svc
之后重启iis 即可