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.

[.NET Core 3.0] HTTP 500.0 - ANCM In-Process Handler Load Failure

See original GitHub issue

The symptom is similar to the OP’s issue in #6111. However, CODE circumstances are mightily different.

Here is what I did:

Visual Studio 16.1.0 Preview 2.0 > Created a brand new ASP.NET Core Web application. On the Template selection screen, I selected “Empty”, let it configure HTTPS and No Authentication.

Once the project was ready in VS, I simply hit F5. The resulting webpage showed the HTTP 500.0 ANCM In-Process Handler Load Failure error, and a Google search led me to #6111.

I don’t have a web/other config file like the OP in 6111.

Reading through the other thread, I made the following notes:

  1. VS configured my project to build as a “Console Application”. So this generated the following files in the bin/debug/netcoreapp3.0 folder:
WebApplication1.dll
WebApplication1.exe
WebApplication1.pdb
WebApplication1.deps.json
WebApplication1.runtimeconfig.dev.json
WebApplication1.runtimeconfig.json
  1. When I ran dotnet WebApplication1 from a command prompt, I was told:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-WebApplication1 does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
  1. For dotnet WebApplication1.exe, I got:
Error:
  An assembly specified in the application dependencies manifest (WebApplication1.deps.json) has already been found but with a different file extension:
    package: 'WebApplication1', version: '1.0.0'
    path: 'WebApplication1.dll'
    previously found assembly: 'D:\temp\WebApplication1\bin\Debug\netcoreapp3.0\WebApplication1.exe'
  1. If I tried to execute the DLL directly, I get:
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'D:temp\WebApplication1\bin\Debug\netcoreapp3.0\WebApplication1.dll'. An attempt was made to load a program with an incorrect format.

So I changed the project’s properties to output a Class Library instead of the Console Application EXE. With this, I got:

A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'D:\temp\WebApplication1\bin\Debug\netcoreapp3.0\'.
Failed to run as a self-contained app. If this should be a framework-dependent app, add the D:\temp\WebApplication1\bin\Debug\netcoreapp3.0\WebApplication1.runtimeconfig.json file specifying the appropriate framework.

I literally have not changed a single line of code or text anywhere in this template-built project. What’s wrong with it?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, May 9, 2019

I shall do this later today or tomorrow. .NET Core isn’t a priority for me. I was only trying it out post the announcements made at //build.

0reactions
analogrelaycommented, May 22, 2019

Closing this as we haven’t heard from you and generally close issues with no response after ~7 days. Please feel free to comment if you’re able to get the information we’re looking for and we can reopen the issue to investigate further!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix error "ANCM In-Process Handler Load Failure"?
This is a NET Core 2.2 application. I cannot get the site to show. I am getting this error: HTTP Error 500.0 -...
Read more >
How to fix HTTP Error 500.0 - ANCM In-Process Handler ...
Hi, I'm developing a project with asp.net core 3.1. Everything was working fine until I published the project on IIS.
Read more >
Intermittent requests returns "http error 500.0 - ancm in- ...
Intermittent requests returns "http error 500.0 - ancm in-process handler load failure". Project is asp.net core 3.1 deployed in on-prem IIS.
Read more >
ASP.NET Core dotTrace HTTP Error 500.0 - ANCM In-Process ...
I'm getting HTTP Error 500.0 - ANCM In-Process Handler Load Failure when analysing performance for ASP.NET Core 3.1 using dotTrace: Steps to reproduce:....
Read more >
Why I am getting ANCM In-Process Handler Load Failure ...
NET Core 3 and it works fine, if I press the run button with "IIS Express" in visual studio. But I am getting...
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