Skip to content

Install package: HTTP Error 500.0 - ANCM In-Process Handler Load Failure

0

Hi,

I created a netcore 2.2 webapi project and uploaded it to AWS elasticbeanstalk. Worked great til I tried to add a specific package.

dotnet new webapi

^uploaded to EB and displays the API result in browser.

dotnet add package Microsoft.Extensions.Caching.StackExchangeRedis --version 2.2.5

^added a package. below was the change done to my csproj. No code was changed other than the csproj.

<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="2.2.5" /
>```

After I uploaded this new deployment , it doesn't seem to run properly.  The site is displaying:  
  
HTTP Error 500.0 - ANCM In-Process Handler Load Failure  
  
  
Any thoughts?  Feels like I'm hitting a common scenario, but I havn't quite seen actionable resources on how to go about troubleshooting it on AWS elasticbeanstalk.  I'll happily provide more info or steps I've taken, please ask what I can provide!
asked 6 years ago669 views
1 Answer
0

Ok good news, figured it out. For additional context, I ran thru this tutorial but with a webapi instead and I got into my troubles.

I saw the logs complain about some .net core dll not existing.

2019-07-22T00:48:20.000Z Error 0:(0) IIS AspNetCore Module V2 - Could not find inprocess request handler. Captured output from invoking hostfxr: Error:
  An assembly specified in the application dependencies manifest (webapi.deps.json) was not found:
    package: 'System.Diagnostics.PerformanceCounter', version: '4.5.0'
    path: 'runtimes/win/lib/netcoreapp2.0/System.Diagnostics.PerformanceCounter.dll'

I figure it had to be something about the SDK on the EC2 not being installed or installed differently on my local machine. Therefore I found a way of embedding all of .net core into my deployment package.

dotnet publish -o site -c Release -r win-x64 --self-contained

Then it worked! Of course...after I configured the security groups as described here: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/accessing-elasticache.html#grant-access

answered 6 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.