After updating my project to "Microsoft.AspNetCore.All" 2.2.0, I get an error when running in IIS, but not when running in Visual Studio.
HTTP-Fehler 500.21 - Internal Server Error
Der Handler "aspNetCore" weist das ungültige Modul "AspNetCoreModuleV2" in der Modulliste auf.
I don't know what is causing this and the www does not seem to have an answer. Maybe someone facing the same thing and has a solution
To check, right click on dependencies and choose manage NuGet Packages. And in the update tab, you'll see a list of packages which are available for updates. Like in this case, there is an update available for the “Microsoft. AspNetCore.
You just need to install this package below. After that you can use the AspNetCoreModuleV2 :)
https://dotnet.microsoft.com/download/thank-you/dotnet-runtime-2.2.2-windows-hosting-bundle-installer
When installing, please notice to install as administrator. As part of the installation the applicationHost.config
file will be updated to include AspNetCoreModuleV2
and its dll. this is one of the reasons why it's important to run installation with admin privilege.
I have the same issue. it is something wrong with AspNetCoreModuleV2
:
modules="AspNetCoreModuleV2"
The site is working when I change the modules to AspNetCoreModule
in the web.config
:
modules="AspNetCoreModule"
I'm publishing to a shared host so not able to install the package mentioned.
Changing AspNetCoreModuleV2
to AspNetCoreModule
is the solution recommended by my host and seems to work.
Next task is working out how to get VS to write the correct thing so I don't have to edit web.config
every time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With