HTTP 502.5 - ASP.NET Core无法在IIS中启动

问题描述 投票:0回答:1

我在Windows Server 2012上的IIS上启动ASP.NET Core网站时遇到问题

我在Windows EventLog中收到以下错误:

Application 'MACHINE/WEBROOT/APPHOST/IDENTITY' with physical root 'D:\CompanyName\IdentityServer\' failed to start process with commandline 'dotnet .\identityserver.dll', ErrorCode = '0x80004005 : ff.

我启用了stdout日志记录,但它生成的日志文件为empty = 0kb。我更新了整个文件夹,以完全控制IIS应用程序池用户。

我还安装了Hosting Bundle和Microsoft Visual C ++ 2015 Redistributable ......

当我在命令行中运行它时,应用程序运行没有问题:

dotnet .\identityserver.dll

我可以让它运行的唯一方法是将应用程序池标识设置为NETWORK SERVICE

所以对我来说似乎是一个权限问题,但应用程序池标识可以访问网站文件夹中的所有内容?

asp.net asp.net-core iis-8
1个回答
0
投票

您是否已将.NET Core Runtime安装到服务器并重新启动IIS?如果已安装一个。尝试检查您的应用程序池>“无管理代码”中选择的“.NET Framework版本”如果仍然无法工作,请尝试在“web.config”中更改以下代码

  <aspNetCore processPath="dotnet" arguments=".\mywebsite.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />
to 
  <aspNetCore processPath="C:\Program Files\dotnet\dotnet.exe" arguments=".\mywebsite.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />

https://www.microsoft.com/net/download

© www.soinside.com 2019 - 2024. All rights reserved.