1

I have an asp.net core 2.0 hosted locally on IIS 10. For some reason DefaultAppPool keeps stopping as soon as I hit the hosted website. And I am getting HTTP Error 503. The service is unavailable.

In event logs I see following error;

The Module DLL C:\WINDOWS\system32\inetsrv\aspnetcore.dll failed to load. The data is the error.

When I check the path C:\WINDOWS\system32\inetsrv\ I do not see aspnetcore.dll exists. Should it be there? If yes, .net core installation exe shouldn't be copy it?

Here are some information below;

core installed

IIS App Pool

Event Logs

intesrv

What I tried, and did not worked?

  1. Troubleshooting IIS AppPool crashes
  2. Uninstalled .net core and reinstalled.
  3. Changed App Pool Identity to Network Service etc.

Any idea how I can fix this?

Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158

4 Answers4

2

For hosting .Net Core applications in IIS, .Net CLR Version of application pool should be No Managed Code as shown in below screenshot. If you don't see "No Managed Code" option in in dropdown then you need to install .Net Core Hosting Bundle. enter image description here

Pankaj Kapare
  • 7,486
  • 5
  • 40
  • 56
1

Ensure you have .NET Core Hosting Bundle installed as mentioned here: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.1&tabs=aspnetcore2x

Mohsin Mehmood
  • 4,156
  • 2
  • 12
  • 18
1

I also had this problem in Windows server 2012 R2

I found this answer: ASP.NET Core/.NET Core: Runtime & Hosting Bundle (latest versions) depends on Microsoft Visual C++ 2015 Redistributable

  1. Download and install KB2919442
  2. Run windows update, which will download and install KB2919335. Alternatively manually download and install KB2919335
  3. Install Visual Studio 2015 C++ Redistributable
1

I got this issue one time. Reason was Server OS was x64 base and target run time of installer was win-x86. In the publish wizard, win-x86 is the default option for Target Run time. Theoretically x86 application should work in x64. But after deploying the win-x64 , issue resolved.

Jomy John
  • 6,308
  • 4
  • 28
  • 32