question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

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

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
blowdartcommented, Aug 4, 2020

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

0reactions
joeloffcommented, Mar 30, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Module "aspnetcorev2.dll" failed to load
dll is actually ASP.NET Core 2.0 Module, commonly called ANCM. This module needs some setup and configuration if the ASP.NET Core 2.0/2.1/2.2 is ......
Read more >
Module DLL C:\Program Files (x86)\IIS\Asp.Net Core ...
How to resolve the error message "module DLL C:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll failed to load" found in ...
Read more >
IIS AspNetCore Module V2: Failed to start application '/LM/ ...
I have a .NET Core 3.1 Web API project that I am hosting using IIS. Project Details (see target framework): <Project Sdk="Microsoft.NET.
Read more >
Failed to Load aspnetcorev2.dll While Hosting ASP.NET ...
The Module DLL C:\Program Files\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll failed to load. The data is the error.
Read more >
aspnetcorev2.dll free download
aspnetcorev2.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found