'aspnetcoremoduleV2 missing from iis modules after running the runtime bundle

I dont have aspnetcoremoduleV2 in iis modules, even after installing the runtime/hosting bundle

so I cant deploy or test any core service

P.S: I used to have the moduleV2 in iis, but I accidentally deleted some files from C:/inetpub folder (not 100% sure if any files were actually deleted), but since then the module disappeared and all core apps are giving me "aspNetCore" has a bad module "AspNetCoreModuleV2" in its module list using IIS"

in folder Systerm32/inetsrv the module is missing, when I tried to add it manually and and it in the app.hosting file the iis (sort of crashed) no app was able to run until I removed these Manuel edits

I tried to re-install iis several time/ reinstall the bundle but had to luck



Solution 1:[1]

following from @brandoZhang's answer & iis docs here

I have done the following and its now working 1- delete the current aspNetCoreModule (I guess this part was unnecessary) 2- install the module manually if it doesnt appear in iis modules after downloading the runtimebundle

  • open cmd as admin
  • navigate to inetSrv location "C:\Windows\System32\inetsrv"
  • run: appcmd.exe install module /name:AspNetCoreModule /image:%windir%\system32\inetsrv\aspnetcore.dll
  • ans same for aspnetcoremoduleV2, but its location is in different place mine was in %Program Files%\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll

if a duplication error appeared, delete the old one and then re install it

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 qqtf