1. 程式人生 > >記:ASP.NET Core開發時部署到IIS上出現HTTP Error 502.5 - Process Failure的解決方案

記:ASP.NET Core開發時部署到IIS上出現HTTP Error 502.5 - Process Failure的解決方案

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

For more information visit: https://go.microsoft.com/fwlink/?LinkID=808681

 

鄙人建站比較喜歡一開始就部署到IIS上,用VS內建IISExpress就渾身難受。現在使用.net core發現部署到IIS上後報502錯誤,網上查到的文章都是介紹:

專案版本和SDK版本不一致導致的;
IIS程式池CLR版本設定無託管程式碼; 

程式池-高階-載入使用者配置檔案設為true;

等等,嘗試一通沒卵用。

後來發現一篇文章說要給VS安裝開發時IIS支援:

https://docs.microsoft.com/zh-cn/aspnet/core/host-and-deploy/iis/development-time-iis-support?view=aspnetcore-2.1

於是按文章介紹的操作一波終於OK了,執行起來之後,web.config裡面配置會自動更改,加了個IIS啟動: