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:
- Any CPU/x86/x64
- win-x64/win-x86/Portable
- Self-Contained/Framework-dependent
- hostingModel="InProcess"/hostingModel="OutOfProcess"
- Enable 32-bit Applications="true"
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.