IIS 上的 ASP.NET Core 1.0 错误 502.5 [英] ASP.NET Core 1.0 on IIS error 502.5

查看:43
本文介绍了IIS 上的 ASP.NET Core 1.0 错误 502.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将我的服务器 (Windows 2012R2) 更新为以前 .Net Core 1.0 RC2 中的 .Net Core 1.0 RTM Windows 托管包.我的应用在我的 PC 上运行没有任何问题,但服务器一直显示:

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

它以前适用于 RC2 版本.不知道会出什么问题.

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'.

最糟糕的是应用日志是空的!我的意思是那些 stdout_xxxxxxxxx.log 文件完全是空的,并且都是 0 字节大小.

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

推荐答案

所以我有了一台新服务器,这次是 Windows 2008R2,我的应用程序运行良好.

So I got a new server, this time it's Windows 2008R2 and my app works fine.

我不能确定旧服务器的问题是什么,但我有一个想法.

I can't say for sure what the problem was with the old server but I have one idea.

因此,因为我之前编译了应用程序没有考虑任何平台,它给了我dll 版本,该版本仅在目标主机具有 .Net Core Windows 时才有效已安装托管 包.就我而言,它是安装好的.

So because I previously compiled the app without any platform in mind it gave me the dll version which only works if the target host has .Net Core Windows Hosting package installed. In my case it was installed and that was fine.

应用程序无法运行后,我决定将其编译为控制台应用程序,以 win7-x64 作为运行时.这次当我在服务器上运行我的应用程序的 exe 时,它崩溃了,关于缺少 dll 的错误:

After the app didn't work I decieded to compile it as a console app with win7-x64 as runtime. This time the moment I ran the exe of my app on the server, it crashed with an error about a missing dll:

The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing

该 dll 来自于 Visual C++ Redistributable for Visual Studio 2015 中包含的 Universal C Runtime.

That dll is from Universal C Runtime that's included in the Visual C++ Redistributable for Visual Studio 2015.

我尝试在 Windows Server 2012 R2 上安装该软件包(x64 和 x86),但每次都失败(不知道为什么).

I tried to install that package (both x64 & x86) but it failed each time (don't know why) on Windows Server 2012 R2.

但是当我尝试在新服务器 Windows Server 2008 R2 中安装它们时,它们成功安装.这可能是其背后的原因,但仍然不能肯定.

But when I tried to install them in the new server, Windows Server 2008 R2, they successfully installed. That might have been the reason behind it, but still can't say for sure.

这篇关于IIS 上的 ASP.NET Core 1.0 错误 502.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆