.net core部署iis执行此操作时出错web.config

Application 'MACHINE/WEBROOT/APPHOST/

 

IIS 502.5 Error

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

Troubleshooting steps:

  • Check the system event log for error messages
  • Enable logging the application process' stdout messages
  • Attach a debugger to the application process and inspect

For more information visit: https://go.microsoft.com/fwlink/?LinkID=808681

下载并安装相应的.net core SDK:

https://dotnet.microsoft.com/zh-cn/download/dotnet

若安装完dotnet-hosting和.net core sdk后还提示,首先尝试重启IIS,如果依旧提示错误,重启计算机再尝试(这步很重要)

尝试将对应 应用网站停止,切换应用池为无托管,再启动网站,并在wwwroot创建1.txt文件看能否正常访问。

 

HTTP 错误 500.19 - Internal Server Error

无法访问请求的页面,因为该页的相关配置数据无效。

https://docs.microsoft.com/zh-cn/dotnet/core/windows-prerequisites?tabs=netcore21

请下载.net core sdk和host运行时https://www.microsoft.com/net/download

若依旧提示上述错误,请确保.net core 网站应用程序正常部署

安装完重启iis

错误描述

C:\Users\Administrator>dotnet --version

Did you mean to run dotnet SDK commands? Please install dotnet SDK from:

http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

解决办法:

查看环境变量,更改Path环境变量,将C:\Program Files\dotnet ,优先级提前到C:\Program Files (x86)\dotnet\

参考如下:

C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\

 

声明:本站内容来源于原创和互联网,尊重作者版权,转载请注明来源网址,欢迎收藏,谢谢!