ASP.NET Core 1.0 on IIS error 502.5

2019-01-02 23:03发布

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??

29条回答
Explosion°爆炸
2楼-- · 2019-01-02 23:16

I had the same issue when publishing the web app. If anybody still has this problem fixed it by changing {AppName}.runtimeconfig.json

    {
  "runtimeOptions": {
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "1.1.2"
    },
    "configProperties": {
      "System.GC.Server": true
    }
  }
}

Change the version from "version": "1.1.2" to "version": "1.1.1" and everythign worked ok

查看更多
Ridiculous、
3楼-- · 2019-01-02 23:16

Had the same issue and all solutions didn't work. Found this gem and thought I'd pass along if it helps someone else. Install on Server 2012 R2 getting the DLL missing error, try to reinstall VS C++ 2015 and get an error. Fix is to do the following:

Seems the file C:\ProgramData\Package Cache\...\packages\Patch\x64\Windows8.1-KB2999226-x64.msu has problems being installed. Open admin command prompt do:

c:
mkdir tmp
mkdir tmp\tmp
move "C:\ProgramData\Package Cache\...\packages\Patch\x64\Windows8.1-KB2999226-x64.msu" c:\tmp
expand -F:* c:\tmp\Windows8.1-KB2999226-x64.msu c:\tmp\tmp
dism /online /add-package /packagepath:c:\tmp\tmp\Windows8.1-KB2999226-x64.cab

NOTE: replace the "..." with the correct folder name. After this reinstall the VS C++ 2015 package.

查看更多
聊天终结者
4楼-- · 2019-01-02 23:16

Sharing that in my case this error was because i forgot to update project.json with:

"buildOptions": {
    "emitEntryPoint": true
  }
查看更多
戒情不戒烟
5楼-- · 2019-01-02 23:16

I faced the same issue when I tried to publish Debug version of my web application. This set of files didn't contain the file web.config with the proper value of attribute processPath.

I took this file from Release version, value was assigned to the path to my exe file.

<aspNetCore processPath=".\My.Web.App.exe" ... />
查看更多
家丑人穷心不美
6楼-- · 2019-01-02 23:17

Worked for me after changing the publishing configuration.

enter image description here

查看更多
姐就是有狂的资本
7楼-- · 2019-01-02 23:18

I got this issue on my production server after my VS project was automatically upgraded to .NET Core 1.1.2.

I simply installed the 1.1.2 .net core runtime from here on my production server: https://www.microsoft.com/net/download/core#/runtime

查看更多
登录 后发表回答