I am struggling with deploying an ASP.NET Core 2.2 site to Windows 7 SP1 IIS7.5.
The server has dotnet-hosting-2.2.1-win installed. Following are the Programs and Features entries:
Registered IIS modules:
The application pool is configured in the following way:
The app pool is used only by one web application and is running under a windows account.
I am deploying an ASP.NET Core 2.2 website using the following publish settings:
This is the deployed web.config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\App.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>
</location>
</configuration>
Whatever I do, the app pool will stop and the following error will show up in the Event Viewer:
The Module DLL C:\Program Files\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll failed to load. The data is the error.
I tried deploying with:
Also attempted the following workarounds: https://github.com/aspnet/AspNetCore/issues/6118 https://github.com/aspnet/AspNetCore/issues/4206
Whatever I do, I can't make the application pool run. Does anyone know what could be causing those problems?
UPDATE For some reason even the other IIS sites on .NET Framework that used to work before, now can't start with the same error - The Module DLL C:\Program Files\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll failed to load. The data is the error.
ANSWER After a lot of digging it turned out that the installer for the hosting bundle failed to download Microsoft Visual C++ 2015 Redistributable. That is why all websites stopped working. I installed it manually and resintalled the hosting bundle and everything worked.
After a lot of digging it turned out that the installer for the hosting bundle failed to download Microsoft Visual C++ 2015 Redistributable. That is why all websites stopped working. I installed it manually and resintalled the hosting bundle and everything worked.
I faced the same problem on a Windows Server 2012 R2. I tried to reinstall Microsoft Visual C++ 2015 Redistributable, but the error was still there. What fix the problem for me :
Uninstall Runtime & Hosting Bundle and Microsoft Visual C++ 2015 Redistributable
Run the following command to check and repair file system :
sfc /scannow
Run the following command to check the Windows image for any corruption and to perform a repair automatically :
dism /online /cleanup-image /restorehealth
Run Windows Update and install all updates (this can take a while)
Install Runtime & Hosting Bundle from https://dotnet.microsoft.com/download/dotnet-core/2.2
download Microsoft Visual C++ 2015 Redistributable here
https://www.microsoft.com/en-us/download/confirmation.aspx?id=52685
and reinstall hosting bundle.
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