ASP.NET Core 1.0 on IIS error 502.5

Vahid Amiri picture Vahid Amiri · Jul 28, 2016 · Viewed 122.2k times · Source

I just updated my server (Windows 2012R2) to .Net Core 1.0 RTM Windows Hosting pack from the previous .Net Core 1.0 RC2. My app works on my PC without any issues but the server keeps showing:

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

It previously worked with the RC2 version. Don't know what could go wrong.

This is all event viewer says:

Failed to start process with the commandline 'dotnet .\MyWebApp.dll'. Error code = '0x80004005'.

the worst part is that app logs are empty! I mean those stdout_xxxxxxxxx.log files are completely empty and all have 0 byte size.

What should I do?? How can I know the cause of error when it's not logged??

Answer

hatsrumandcode picture hatsrumandcode · Feb 21, 2017

I was able to fix it by running

"C:\Program Files\dotnet\dotnet.exe" "C:\fullpath\PROJECT.dll"

on the command prompt, which gave me a much more meaningful error:

"The specified framework 'Microsoft.NETCore.App', version '1.0.1' was not found. - Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\shared\Microsoft.NETCore.App - The following versions are installed: 1.0.0 - Alternatively, install the framework version '1.0.1'.

As you can see, I had the wrong NET Core version installed on my server. I was able to run my application after uninstalling the previous version 1.0.0 and installing the correct version 1.0.1.