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??
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.
I had the same problem, in my case it was insufficient permission of the user identity of my Application Pool, on Publishing to IIS page of asp.net doc, there is a couple of reason listed for this error:
buildOptions
of project.json
that conflicts with the publishing RID. For example, do not specify a platform of x86 and publish with an RID of win81-x64 (dotnet publish -c Release -r win81-x64
). The project will publish without warning or error but fail with the above logged exceptions on the server.processPath
attribute on the <aspNetCore>
element in web.config to confirm that it is dotnet
for a portable application or .\my_application.exe for a self-contained application.dotnet.exe
might not be accessible via the PATH settings. Confirm that C:\Program Files\dotnet\
exists in the System PATH settings.dotnet.exe
might not be accessible for the user identity of the Application Pool. Confirm that the AppPool user identity has access to the C:\Program Files\dotnet
directory..UseIISIntegration()
method of the application’s WebHostBuilder()
..UseUrls()
extension method when self-hosting with Kestrel, confirm that it is positioned before the .UseIISIntegration()
extension method on WebHostBuilder()
. .UseIISIntegration()
must set the Url
for the reverse-proxy when running Kestrel behind IIS and not have its value overridden by .UseUrls()
.In my case it was the fourth reason, I changed it by right clicking my app pool, and in advanced setting under Process Model, I set the Identity to a user with enough permission:
I got this working with a hard reset of IIS (I had only just installed the hosting package).
Turns out that just pressing 'Restart' in IIS Manager isn't enough. I just had to open a command prompt and type 'iisreset'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With