Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

502.5 error when deploying asp.net core website using IIS

I have an ASP.NET Core 1.0 application which has been successfully deployed and running on our pre-prod server for months. Today I tried deploying the website to our production server using this article as a guideline: https://docs.asp.net/en/latest/publishing/iis.html

Bottom line is we can't get past this error:

HTTP Error 502.5 - Process Failure

Common causes of this issue:
* The application process failed to start
* The application process started but then stopped
* The application process started but failed to listen on the configured port

We tried the ideas listed in this article, but still no luck: ASP.NET Core 1.0 on IIS error 502.5

How do you go about debugging a 502.5 error, to get to the actual cause of the failure?

The app's log files are getting created, but unfortunately they are empty. The web server's Event Viewer contains this entry:

Process was created with commandline 'D:\Applications\PVP\UserInterface.exe' but failed to get the status, errorCode = 0x80070005

Any help would be very much appreciated! Tory.

like image 862
Tory E Avatar asked Aug 24 '16 21:08

Tory E


People also ask

What is IIS 502.5 error?

23 all return 502.5 IIS Error. HTTP Error 502.5 - Process Failure. Common causes of this issue: The application process failed to start. The application process started but then stopped.


2 Answers

Try to isolate whether the problem is the server (IIS) or the app. Do that by finding and running the app directly. Find your web.config and run the process.

For a DLL this is:

dotnet MyApp.dll

For an EXE this is:

MyApp.exe

For you this probably means running D:\Applications\PVP\UserInterface.exe directly.

like image 182
Shaun Luttin Avatar answered Oct 19 '22 23:10

Shaun Luttin


I've been struggling with this with a .NET Core 2.0 site and once I realized that IIS needs a web.config on the server, I got past it.

Here is my file, the key elements for me were the processPath and arguments.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
<handlers>
  <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" 
    arguments=".\My App.dll" 
    stdoutLogEnabled="true" 
    stdoutLogFile=".\logs\stdout" />
  </system.webServer>
</configuration>
like image 32
Steven Frank Avatar answered Oct 20 '22 00:10

Steven Frank