Reputation: 1
I got this error while testing my new website Locally on IIS Express on .NET5
I have checked that i have the required dotnet version , adding the dotnet paths to the system environment variables and Restarted the visual studio
Upvotes: 0
Views: 1139
Reputation: 1
In my case, When using .NET 5.0 and Visual Studio 2019 in Any CPU mode, I encountered the "HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process)".
Registering the port in the firewall’s inbound rules did not resolve the issue.
The event log showed: “Failed to start application ‘/LM/W3SVC/2/ROOT’, ErrorCode ‘0x8007023e’.”
After changing the Hosting Model from the default (In Process) to Out of Process in Properties -> Debug, the web page successfully opened with the SSL address.
The event log then showed: “Application ‘/LM/W3SVC/2/ROOT’ started process ‘11232’ successfully and process ‘6276’ is listening on port ‘****’.”
HTTP Error 500.0 can occur when the application runs in In-Process hosting mode in IIS. This is because, in Out-of-Process mode, the Kestrel server runs independently, and IIS acts as a reverse proxy, avoiding compatibility issues that can arise in In-Process mode.
I hope this helps.
Upvotes: 0