4
votes

I have a DotNet Core 2.2 application that I am trying to get running through IIS. However, I get the following error: HTTP Error 500.0 - ANCM In-Process Handler Load Failure when I try to load the app in my browser.

Upon checking the logs it says the following:

Error:

  An assembly specified in the application dependencies manifest (blablabla.deps.json) was not found:
    package: 'AutoMapper.Extensions.Microsoft.DependencyInjection', version: '7.0.0'
    path: 'lib/netstandard2.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll'

But I think that's a bit of a red herring.

The following is the output from dotnet --info:

.NET Core SDK (reflecting any global.json):
 Version:   2.2.401
 Commit:    729b316c13

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.2.401\

Host (useful for support):
  Version: 2.2.6
  Commit:  7dac9b1b51

.NET Core SDKs installed:
  2.2.401 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

I have tried all of the following:

  1. Changed "AspNetCoreModuleV2" to "AspNetCoreModule" in the Web.config.
  2. Tried switching AspNetCoreHostingModel=InProcess to RuntimeFrameworkName=Microsoft.AspNetCore.App in my Web.csproj file.
  3. Cleaning and manually deleting the bin, obj, and .vs folders

My application pool is set to 'No Managed Code' (as the guides all say). At a bit of a loss regarding what to do as I've been through every forum post and github issue on the matter. Also, it is running on my colleagues machine whom has the exact same configuration as me.

One thing to note though, if he creates a copy of his application pool (same settings, basic and advanced, just a different name), and tries to run it on that, it doesn't work either and he gets the same error as me. It only works on the application pool called 'Core AppPool' which was automatically added to IIS upon installation of windows server hosting or the SDK (not sure which).

1
What if you use self-contained deployment?Lex Li
I suggest you could also check your application pool identity to have the enough permission to access the core dll folder and your package dll's folder.Brando Zhang
@BrandoZhang That turned out to be the issue. The App Pool didn't have permission to read the Packages folder. No idea why it didn't automatically apply the permissions like it did on the other machine. Not sure what the etiquette is here but if you want to make that a main comment I'll mark it as the answer. Thanks.d4n13l
I had this exact problem. I had already given permission in file explorer. However, when I did the same thing with the "Edit Permissions" menu from inside the IIS control panel, it then worked. odd.Ian Gibblet
This did the trick for me too, Here's a link to the relevant documentation FYI docs.microsoft.com/en-us/iis/manage/configuring-security/…JMussi

1 Answers

3
votes

It seems your application pool identity don't have the enough permission to access your package folder.

I suggest you could try to set the package folder with enough permission by setting the folder's security.