aspnetcore: The Module DLL C:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll failed to load. The data is the error

Describe 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:

  1. 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.

  2. 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

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 1
  • Comments: 19 (13 by maintainers)

Most upvoted comments

I can confirm the issue with Windows Server 2012R2 and Windows Hosting Bundle 3.1.9

This is one of the most useless and ridiculous errors I’ve even seen “… The data is the error”

Isn’t aspn.net core 3.1 supposed to be a production ready framework? After amount of time spent to solve this mysterious problems I really doubt it

Describe 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:

  1. 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.
  2. 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 #24368 (comment)

This issue is not duplicated of #24368

bro, you saved my life today, there was no Microsoft Visual C++ 2015 Redistributable. I just installed it and working well, thanks again

You could also just abort the install if it’s not present and clearly mark it as a dependency in docs.