Recently we had to deploy an ASP.NET Core 2.2 web application to a customer’s Windows 7 SP1 machine with IIS 7.5.
We proceeded with installing the Runtime & Hosting Bundle for 2.2 as usual. We deployed the web app to the server and tried loading it – the result was 503 Server Unavailable. A quick check in IIS showed that the application pool had stopped.
Our configuration was according to Microsoft’s guided – app pool with Integrated pipeline mode and No Managed Code for .NET Framework version. Also this application pool was dedicated to the web app – no other web app was assigned to it.
A quick check in the Event Viewer showed:
The Module DLL C:\Program Files\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll failed to load. The data is the error.
We then started trying all all sorts of different deployment configurations – all resulting in the same error. We also tried installing different versions of the hosting bundle.
At some point we noticed that all applications that were hosted in IIS failed to load with the same error.
After carefully inspecting the Host ASP.NET Core on Windows with IIS article, one specific line caught our attention.
Install the .NET Core Hosting BundleIf the system doesn’t have an Internet connection, obtain and install the Microsoft Visual C++ 2015 Redistributable before installing the .NET Core Hosting Bundle.
The machine had internet connection, but a quick check in the installed programs did not show an installed C++ 2015 Redistributable. Also the hosting bundle installer did not hint any failed install.
After installing the redistributable and reinstalling the hosting bundle, all sites were back to normal and the ASP.NET Core 2.2 app was now working properly.
You can see all attempted solutions in this StackOverflow post – Failed to load aspnetcorev2.dll hosting ASP.NET Core 2.2 on IIS7.
Mayank · June 3, 2019 at 12:53
Perfect solution. Thank you very much.
Ramiro · May 27, 2020 at 20:51
Funcionó perfecto. Gracias
Yaniv Naim · March 8, 2021 at 20:47
Thank you sooooo much