zoukankan      html  css  js  c++  java
  • win2008server R2 x64 部署.net core到IIS--ASP .NET Core HTTP Error 502.5 – Process Failure

    服务器win2008server R2 x64 部署.net core到IIS

    解决ASP .NET Core HTTP Error 502.5 – Process Failure 问题等

    1、发布网站 ;
    2、安装 vc_redist.x64  (Visual C++ Redistributable for Visual Studio 2015) 新装的系统没装的补丁,装过略过;
    3、安装WindowsHosting :如: dotnet-hosting-2.1.3-win ;
    4、安装.Net Core SDK: 如:dotnet-sdk-2.1.401-win-x64 ;
       注意3,4版本要一致; https://www.microsoft.com/net/download/dotnet-core/2.1


    5、重启IIS服务器,cmd 中输入 iisreset.

    6、添加netcore站点,应用程序池的.NET Framework版本选择“无托管代码”:application pool应用池-> 高级 -> 标识 将原来ApplicationPoolIdentity改为对数据库有访问权限和网站文件有读写权限的Windows用户(这里需要确定这个Windows用户可以登录数据库,不行可以在数据库安全设置添加。当然你也可以将数据库连接字符窜改为数据库用户和密码访问,比如:sa),然后重启应用池,重启网站浏览

     

    7、 浏览程序
    浏览程序报错 1 :An error occurred while starting the application.
    看不到详细信息需要修改web.config 查看详细信息 将stdoutLogEnabled的修改为 true,并在应用程序根目录添加 logs 文件夹<aspNetCore processPath="dotnet" arguments=". zky.saas.Web.Host.dll" stdoutLogEnabled="true" stdoutLogFile=".logsstdout" forwardWindowsAuthToken="false" />再浏览网站,当然还是报错,现在到logs目录查看报错详细信息
    浏览程序报错2:ASP .NET Core HTTP Error 502.5 – Process Failure

    这个问题有两个思路:
    第一 : WindowsHosting 和 .Net Core SDK的版本不一致导致;重新安装;
    第二 :服务器缺补丁;验证 dotnet 是否能正常使用,在cmd中 进入 C:Program Filesdotnet>dotnet --version


    cmd 报错2-1:提示 api ms win crt runtime 1-1-0.dll 丢失,dotnet 启动程序失败。 

    安装 vc_redist.x64  (Visual C++ Redistributable for Visual Studio 2015)  后还有错误:

    Filesdotnethostfxr1.0.1hostfxr.dll], HRESULT: 0x8007007E】错误
    ErrorCode = '0x80004005 : 80008082.
     KB2999226 微软下载链接 https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows
     KB3118401 微软下载链接 https://support.microsoft.com/en-us/help/3118401/update-for-universal-c-runtime-in-windows

    需要下载安装KB2999226补丁程序 ,注意是win2008server R2 x64 版本的;

    cmd 报错2-2:Filesdotnethostfxr1.0.1hostfxr.dll], HRESULT: 0x80070057】错误

    win2008server R2 x64 部署.net core到IIS上出现【Failed to load the dll from [C:Program Filesdotnethostfxr1.0.1hostfxr.dll], HRESULT: 0x80070057】错误
    解决方法: 需要安装补丁:KB2533623 下载地址如下:https://support.microsoft.com/en-us/kb/2533623 需要重启

     重启后 用dotnet 命令在项目根目录下直接运行你的Web程序,例如 dotnet xxxWeb.dll   正常启动:

     


      最后祝君成功!

     

    下以是服务器win2008server R2 x64安装包:
    NDP471-KB4033344-Web  是 .net framework 4.7.1
     
     
     
    能量到位,不必催促,水到渠成
  • 相关阅读:
    手机品牌大集合
    什么是全角和半角?
    String,StringBuffer,StringBuild的区别
    什么是法人?法定代表人?法人代表?法定代表?
    如何得到table里面的ID
    Jquery代码编写工具Komodo
    jquery 验证email
    jQuery使用手册 (转)
    centos iptables 防火墙 命令
    php webservice实例(转载)
  • 原文地址:https://www.cnblogs.com/Asahi1223/p/9936352.html
Copyright © 2011-2022 走看看