1、打包发布:我采用文件系统方式

IIS部署.net core 3.1踩坑总结

 

 

 2、应用程序池配置

IIS部署.net core 3.1踩坑总结

 

 

 3、踩坑:HTTP Error 500.30 错误

 IIS部署.net core 3.1踩坑总结

这个错误折磨很长一段时间,各种查询解决方案。

①以下插件根据自己的版本统一下载。

服务器装aspnetcore-runtime-3.1.8-win-x64.exe

下载链接:https://dotnet.microsoft.com/download/dotnet-core/3.1

IIS部署.net core 3.1踩坑总结

 

 

 

服务器装dotnet-hosting-3.1.1-win.exe

注意:安装dotnet-hosting-3.1.1-win.exe可能导致所有的应用程序池都停止了,手动起来也会自定停止,这个时候不要慌,把dotnet-hosting-3.1.1-win.exe卸载了,再安装vc_redist.x64.exe,下载链接:https://www.microsoft.com/en-us/download/details.aspx?id=48145

②iis配置日志

IIS部署.net core 3.1踩坑总结

 

 

 然后运行项目,查看日志发现下面这个错误,复制错误信息查询发现是DTC没有启动,启动了DTC后500.30就解决了

IIS部署.net core 3.1踩坑总结

 

 

 ③错误信息

IIS部署.net core 3.1踩坑总结

 

 

我更改了Web.config中的规范以使其无法运行。最初,该规范是针对InProcess的,如下所示:

 <aspNetCore processPath="dotnet" arguments=".\Cashflow.dll" stdoutLogEnabled="false" hostingModel="InProcess" stdoutLogFile=".\logs\stdout">

将InProcess更改为OutOfProcess:

<aspNetCore processPath="dotnet" arguments=".\Cashflow.dll" stdoutLogEnabled="false" hostingModel="OutOfProcess" stdoutLogFile=".\logs\stdout">

这个错误就解决了。

④代码配置了跨域处理,iis部署后还是报错跨域问题

 IIS部署.net core 3.1踩坑总结

 

 待续....文字待整理,先简单记录下

相关文章:

  • 2021-09-04
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2021-07-22
猜你喜欢
  • 2022-12-23
  • 2020-05-16
  • 2021-07-01
  • 2021-05-30
  • 2019-12-04
  • 2022-03-08
相关资源
相似解决方案