I've been developing a .NET 6/7 WebAPI site and ran into a HTTP Error 500.31 error when hosting the site in IIS.
more specifically IIS reports this error page:
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.
The ACTUAL problem i had, was that the Web.Config was referencing an incorrect DLL :
the 500.31 error suggest that the framework installation on the host machine is to blame, which sends the developer out on the wrong direction of problem solving.
Expected Behavior
I would expect a better error message, that the Path of the DLL (the argument) is incorrect.
It shouldn't be that hard for dotnet.exe to tell me that the argument is wrong.
Steps To Reproduce
Spin up a new .NET 6 WebAPI site in Visual Studio 2022
Is there an existing issue for this?
Describe the bug
I've been developing a .NET 6/7 WebAPI site and ran into a HTTP Error 500.31 error when hosting the site in IIS.
more specifically IIS reports this error page:
The ACTUAL problem i had, was that the Web.Config was referencing an incorrect DLL :
the 500.31 error suggest that the framework installation on the host machine is to blame, which sends the developer out on the wrong direction of problem solving.
Expected Behavior
I would expect a better error message, that the Path of the DLL (the argument) is incorrect.
It shouldn't be that hard for dotnet.exe to tell me that the argument is wrong.
Steps To Reproduce
Exceptions (if any)
No response
.NET Version
6 or 7
Anything else?
No response