当前位置: 移动技术网 > IT编程>开发语言>.net > asp.net core 2.0发布到IIS报错解决方案

asp.net core 2.0发布到IIS报错解决方案

2019年05月21日  | 移动技术网IT编程  | 我要评论

我的舞台 快乐男声,康师傅茉莉清茶代言人,颁奖在即 尔冬升郑中基为金像奖拜神

  大体来说,是环境的问题。

  第一个错误,如图:

  

    1. 查了网上说是文件夹权限的问题,依次设置了everyone权限和iis_iuser权限,能勾选的都勾选了,然而并没有什么用,看来不是这个问题导致的。

    2. 项目是.net core 2.0,所以想,可能是环境问题,需要安装 aspnetcoremodule托管模块。

        >> dotnetcore.2.0.9-windowshosting.exe  

        >>安装完成后,使用命令重启iis       net stop was /y 

                        net start w3svc

        >>编辑应用程序池,把.net clr版本设置为无托管代码,如下图:

            

 

        >>此时不报500.19的错误,改报

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

 

  第二个错误,502.5:

    尝试了许多方法。

    1. 在folderprofile.pubxml文件中添加节点:

 

<propertygroup>
 <publishwithaspnetcoretargetmanifest>false</publishwithaspnetcoretargetmanifest> 
</propertygroup>

     >>重新发布后还是不行。

    2. net core sdk没有安装,或者版本安装错误:

        进入网站物理路径目录根目录,打开dos 输入命令,直接运行web程序:dotnet xxxweb.dll

          dotnet.exe报错,>>计算机中丢失 api-ms-win-crt-runtime-l1-1-0.dll

                                      解决方案:安装visual c++ redistributable for visual studio 2015 组件

                                                         下载地址:https://www.microsoft.com/en-us/download/details.aspx?id=48145

                           

 

 

>>发布成功了。

 微软文档:

 参考博客:https://www.cnblogs.com/eggtwo/p/9900613.html               

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网