The Module DLL C:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll failed to load. The data is the error
See original GitHub issueDescribe the bug
Here is an excellent description of the error
100% percent exactly to what I faced: (https://stackoverflow.com/questions/54176640/the-module-aspnetcorev2-dll-failed-to-load)
I will copy the StackOverflow question here if you do not want to go there and read the question and its solution
Recently I tried installing ASP.NET Core/.NET Core: Runtime & Hosting Bundle version 3.1.5 (NOT 2.2 version) on a machine running Windows Server 2012 R2 (not Windows Server 2008 R2). However, after installing IIS stops working and gives 503 Service unavailable error for all applications hosted in it. After checking the application pools I see that the pools just shut down.
In the event viewer, I can see the following error message -
The Module DLL C:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll failed to load. The data is the error.
I have tried setting the pool to both 32/64 bits, but the error is the same. Did anybody else face this problem or have a solution for this?
Simply the problem is that Microsoft Visual C++ 2015 Redistributable
does not exist on the server.
When I installed it, everything worked like charm.
I spent 1 month to discover this problem, I just wanted to suggest the following :
when installing ASP.NET CORE Hosting bundle 3.1.x why the not giving an error which says Hosting bundle can not be downloaded because Microsoft Visual C++ 2015 Redistributable does not exist
If I faced this imaginary error message when I was installing ASP.NET CORE Hosting Bundle, I would immediately install Microsoft Visual C++ 2015 Redistributable and I would save one month of efforts for me and for my become-angry client
I really like Microsoft, I am working with its technologies from about 10 years, but because of some errors like these I am really going crazy, I started to consider to move to node.js even I am a loyal Microsoft client.
Please, I am suggesting one of two things:
-
Prevent ASP.NET CORE Hosting Bundle from installing if the Microsoft Visual C++ 2015 Redistributable dependency does not exist, Of course with a very very clear error message.
-
Install Microsoft Visual C++ 2015 Redistributable automatically (if not already exists) when Installing ASP.NET CORE Hosting Bundle (this would be much better)
Here is another question on StackOverflow which describes the same problem https://stackoverflow.com/questions/54368738/failed-to-load-aspnetcorev2-dll-hosting-asp-net-core-2-2-on-iis7
Please Notice that I am not using 2.2 Hosting bundling as this answer said https://github.com/dotnet/aspnetcore/issues/24368#issuecomment-665904289
This issue is not duplicated of #24368
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:19 (13 by maintainers)
You could also just abort the install if it’s not present and clearly mark it as a dependency in docs.
Adding a check for the VC redist should be simple. I took a peek at the 14.28.29913.00 release. A simple registry search can be done to identify the vc_runtimeMinimum installation. The full redist brings in a number of patches (MSUs), and those would be more difficult to detect because they are OS specific.
A simple util:RegistrySearch in the bundle and a BAL:Condition can be used to block the install. The registry path you need to search is
SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\X64
and then checking for the Version value. Similarly for x86 and the condition the blocks appropriately, e.g. only check for x64 if VersionNT64 is set.Since the redist is upgradable, you’ll likely need to do a >= version check once the minimum version is determined
@wtgodbe FYI