5

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.

Community
  • 1
  • 1
Tory E
  • 165
  • 1
  • 2
  • 5
  • I wrote this post https://blog.3d-logic.com/2016/06/08/running-asp-net-core-applications-with-iis-and-antares/ Towards the end it shows the way of troubleshooting this kind of errors. First check event log. Second enable stdoutLog – Pawel Aug 25 '16 at 04:47
  • 1
    Thanks Pavel. I read through the article. As noted above, the stdout log files are getting created. but are always of 0 size, so they are not providing me anything useful to go on. Also, the Event Log does have an error that I also noted above. The error seems pretty generic and googling it hasn't lead me anywhere. – Tory E Aug 25 '16 at 15:54

2 Answers2

3

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.

Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
  • 1
    Hi Shaun, Thanks for the reply. I tried running the .exe and then hitting [link](http://localhost:5000), and it seemed to be working fine. Since writing this post, we have brought up a 2nd production webserver, and the app is launching fine. It is still a mystery why it is not working on the 1st production webserver. – Tory E Aug 26 '16 at 21:28
2

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>
Steven Frank
  • 551
  • 3
  • 16
  • 1
    It has been a while since I made the original post. We were finally able to root cause the issue. For us, the web.config file was there, but for some reason, the publish step was not updating it properly. Once we put a valid web.config file in place, the issue went away. – Tory E Sep 06 '17 at 17:28
  • My web.config had an dll that doesn't exist in the arguments. Remove the extra dll in the file fixed the problem. I think it has something to do with restructuring the projects. – frogcoder Nov 23 '17 at 04:44