Issue
After uninstalling .NET Core 2.2, Internet Information Server (IIS) stops working with the error
503 Service unavailable
The Windows Event Viewer reports that it was unable to load C:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll
.
This issue occurs because the .NET Core installer that added aspnetcorev2.dll is the installer that will remove it. However, all .NET Core or .NET 5+ installers will add the DLL if they are the first installation.
Solution
Quick Fix
Reinstall .NET Core 2.2 to restore the missing DLL. *
- Go to https://dotnet.microsoft.com/en-us/download/dotnet/2.2
- Download and install version 2.2.8 of the Web Hosting Bundle.
- Restart IIS.
Correct Fix
Edit the IIS configuration file and remove the reference to the missing DLL.
- Backup the file C:\WINDOWS\system32\inetsrv\config\applicationHost.config.
- Edit the file applicationHost.config to remove the line that looks like this:
<add name="AspNetCoreModuleV2" image="%ProgramFiles%\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll" />
- Restart IIS.
* Note: TASKE version 2022.2 has updated the .NET version to the supported 6.0 version. Please contact support for information about acquiring the upgrade.