Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aspNetCore 2.2.0 - AspNetCoreModuleV2 error

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

like image 755
DirtyNative Avatar asked Dec 11 '18 18:12

DirtyNative


People also ask

How do I update my AspNetCore app?

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.


3 Answers

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.

like image 98
Marcos Rodrigues Avatar answered Oct 22 '22 05:10

Marcos Rodrigues


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" 
like image 35
Anh N Avatar answered Oct 22 '22 05:10

Anh N


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.

like image 39
Brian Lowe Avatar answered Oct 22 '22 04:10

Brian Lowe