0

So I am getting the rather common HTTP Error 502.5 - Process Failure now that I've hosted my project on a server VM running Windows Server 2016. While troubleshooting, I've attempted most of the solutions proposed for the same error:

ASP.NET Core 1.0 on IIS error 502.5.

Nothing else helped, so I'm looking at the answer that received the most upvotes. This mentions running the following command to receive a more meaningful message describing the error:

C:\fullpath\dotnet C:\fullpath\PROJECT.dll

I am honestly not sure how to execute that. What I did was navigate to the published project's containing folder on the server through the cmd, and issue the command like so:

dotnet .\My_Project Integration.dll

But the console prints this in response:

No executable found matching command "dotnet-.\My_Project"

Notice how the DLL is titled 'My_Project Integration.dll, however the word 'Integration' is absent from the console response. I do not know whether the underscore is to blame here, but any help is appreciated getting the command to run.

And of course, if you know of a solution to the actual 502.5, that is welcome as well.

Andrey Belenkiy
  • 185
  • 5
  • 17
  • Make sure you are in the directory where the dll is located and run dotnet My_Project Integration.dll . The ".\" is what's causing the problem. If I had to guess, the 502.5 is probably due to a mismatching package version, or possibly a out of date hosting bundle on your VM. – Jonathan Carroll Jul 24 '18 at 16:53
  • Try enabling logging for the ASP.NET Core Module to get more information about why the process can't start: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/troubleshoot?view=aspnetcore-2.1#aspnet-core-module-stdout-log – Justin Helgerson Jul 24 '18 at 17:02
  • Also when you run your `dotnet` command, put the whole path in quotes. You have a space in your filename so it needs to be quoted. – Justin Helgerson Jul 24 '18 at 17:03
  • @JustinHelgerson Thanks for all the suggestions. I did put the whole path in quotes and my application started running in the console window. No errors. I also enabled stdout logging and am finding the same message as previously in the console: No executable found matching command "dotnet-.\My_Project". How can I perform the same fix as while launching manually? – Andrey Belenkiy Jul 24 '18 at 17:36
  • @AndreyBelenkiy Have you checked the system eventviewer log for errors that may be preventing your app from executing via IIS – Mohsin Mehmood Jul 24 '18 at 17:46
  • You should run something like `dotnet .\My_Project\Integration.dll` so as to give the `dotnet` command a valid path to an assembly. Leaving a space there would confuse the command line and that's why there is an error reported. – Lex Li Jul 24 '18 at 18:10

1 Answers1

1

You've likely got this issue: https://github.com/aspnet/Home/issues/1931. The ASP.NET Core IIS Module reads the Web.config to determine what to execute to run the app.

You said running dotnet ".\My_Project Integration.dll" worked successfully and enabling stdout showed the same issue of the path being truncated after the space.

Two options:

  1. Remove the space from your project (this would be the easiest option)
  2. Update your Web.config

If you do #2, your Web.config needs to have something like this for the arguments attribute:

arguments='".\My_Project Integration.dll"'
Justin Helgerson
  • 24,900
  • 17
  • 97
  • 124