3

I'm getting this error after deploying my API to AWS Elastic Beanstalk.

Steps to reproduce

  • File -> New -> Project
  • ASP.NET Core Web Application
  • ASP.NET Core 2.0
  • Web API
  • F5: OK
  • Publish to AWS Elastic Beanstalk... (via AWS Tollkit for Visual Studio 2017)
  • HTTP Error 502.5 - Process Failure

Additional info

  • Visual Studio 2017
  • 64bit Windows Server 2012 R2 v1.2.0 running IIS 8.5

I've already tried looking up many other questions, but to no success.


Error Log
2018-01-15T13:27:21.000Z Error 0:(0) IIS AspNetCore Module - Application 'MACHINE/WEBROOT/APPHOST/DEFAULT WEB SITE' with physical root 'C:\inetpub\AspNetCoreWebApps\app\' failed to start process with commandline 'dotnet .\WebApplication2.dll', ErrorCode = '0x80004005 : 8000808c.

Matheus Lacerda
  • 5,983
  • 11
  • 29
  • 45
  • How did you resolve that issue? – Nick May 31 '18 at 16:56
  • Personally, as answered below. But it seems there are other causes for this, with other solutions. I'd recommend looking up the other three links presented in the question body if that's your case. – Matheus Lacerda Jun 01 '18 at 04:34

2 Answers2

8
  <PropertyGroup>
    <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
  </PropertyGroup>

Adding the above code to the .csproj solved the problem.

Matheus Lacerda
  • 5,983
  • 11
  • 29
  • 45
4

I faced the same issue. After contacting AWS support, it turns out that there was a bug in my code [Release version].

I suggest the following steps to debug locally:

  1. Publish your solution to a file
  2. Open Command Prompt in the published folder
  3. Run "dotnet Your.Main.App.dll"
  4. Most probably you will see an exception

Sometimes we forget to test our solutions in Release mode.

Cheers!

Nick
  • 165
  • 2
  • 18