I have a web application with a Target Framwork of .NET 7.0. I have installed the hosting bundle for .NET 7.0 on the windows 2016 server with IIS 10. However, the application will not run with an error:
HTTP Error 500.31 – Failed to load ASP.NET Core runtime
Common solutions to this issue:
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
How can this be resolved?
Also, please note that the web application was upgraded from .NET 6.0 to .NET 7.0 prior to the issue happening.
Thanks.
2
Answers
I setup a new VM Server and installed the .NET 7.0 Hosting Bundle and it is working now. Unfortunately, I was not able to configure this on the original server, but the new server is working properly.
A possible solution to this issue is to check the version of the ASP.NET Core runtime that your application is targeting and make sure that it is installed on the server.
You can then go to the official download page with Download .NET 7.0 Link and download the Hosting Bundle for Windows. This will install the ASP.NET Core runtime and the IIS support for hosting ASP.NET Core applications.
After installing the hosting bundle, you may need to restart the IIS service or the server for the changes to take effect.