当前位置:首页 > iis运行.net core 程序报502错误

iis运行.net core 程序报502错误

点击次数:2559  更新日期:2020-02-18

iis运行.net core 程序报502错误

查看Windows应用程序日志显示

Application 'MACHINE/WEBROOT/APPHOST/APISITE' with physical root 'D:\wwwroot\xxx\' failed to start process with commandline 'dotnet .\xxx.dll', ErrorCode = '0x80070002 : 0.

解决方式如下

1、在cmd中输入 where dotnet

image.png

2、把web.config中

<aspNetCore processPath="dotnet"

修改为

<aspNetCore processPath="C:\Program Files\dotnet\dotnet.exe"