self-contained asp.net core web api is getting:- Failed to initialize CoreCLR, HRESULT: 0x80131500 on Ubuntu 16.10-x64

2

I have a self contained asp.net core website, than I am able to run fine in windows 10, but when publishing for ubuntu.16.10-x64, and running it in ubuntu 16.10 x64 desktop version is getting a:

Failed to initialize CoreCLR, HRESULT: 0x80131500

I have run updates and upgrades of the os: (sudo apt-get update, sudo apt-get upgrade)

I am executing the starting command as sudo.

The file has run permissions ( -rwxrwx--x )

TargetFramework is netcoreapp1.1.

libicu-dev is already the newest version (55.1-7ubuntu0.2).

How to go about troubleshooting the error?

ubuntu-16.04
asp.net-core-webapi
asp.net-core-1.1
asked on Stack Overflow Jul 27, 2017 by amy8374 • edited Jul 27, 2017 by amy8374

2 Answers

0

Update 28/07/17

While it seems there are several related issues which can cause this (most seem to be dependency related), some users have reported that for Ubuntu 16.1 following the instructions on the get started page has resolved the error.

Several other fixes for various other scenarios are suggested on this thread.

In addition, as per https://github.com/dotnet/coreclr/issues/11417 - some instances may be due to an existing bug in the CoreCLR 1.1 - which does not sound likely to be fixed in this version. Migrating to version 2.0 is suggested as a workaround in that case.

Original answer:

To help with diagnosing the issue, you can enable detailed startup errors by specifying detailed error logging with .UseSetting("detailedErrors", "true") and .CaptureStartupErrors(true) as per the following example:

public static void Main(string[] args)
{
  var host = new WebHostBuilder()
      .UseKestrel()
      .UseContentRoot(Directory.GetCurrentDirectory())
      .UseSetting("detailedErrors", "true")
      .UseIISIntegration()
      .UseStartup<Startup>()
      .CaptureStartupErrors(true)
      .Build();

  host.Run();
}
answered on Stack Overflow Jul 27, 2017 by Steve Land • edited Jul 28, 2017 by Steve Land
0

Update 01/24/2018

the issue got resolved after moving to .net core 2.0

answered on Stack Overflow Jan 24, 2018 by amy8374

User contributions licensed under CC BY-SA 3.0