[.NetCore 小筆記] 虛擬主機上佈署 .net Core 3.1 出現 HTTP Error 500.35 - ASP.NET Core does not support multiple apps in the same app pool

2021-05-12


最近測試東西有用一家 虛擬主機廠商叫做 SmarterASP,其中 "可能" 因為共用 application pool 的關係就會出現 HTTP Error 500.35 - ASP.NET Core does not support multiple apps in the same app pool


簡單的解決方法 假設你佈署兩個站台 該兩個站台都是用.net core 寫的,就會出現該錯誤,這時候我網路上找了一下簡單的說 該兩個網站都要修改 web.config,關鍵是 hostingModel="OutOfProcess"

原  web.config :


修改後

如果你只改了一個網站另一個沒改會出現

HTTP Error 500.34 - ASP.NET Core does not support mixing hosting models
Common solutions to this issue:
Select a different app pool to host this app.
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=2028526

紀錄一下,給需要用的人..


reference:

https://stackoverflow.com/questions/58246822/http-error-500-35-ancm-multiple-in-process-applications-in-same-process-asp-ne


當麻許的超技八 2014 | Donma Hsu Design.