服务器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 文件夹再浏览网站,当然还是报错,现在到logs目录查看报错详细信息 浏览程序报错2:ASP .NET Core HTTP Error 502.5 – Process Failure 这个问题有两个思路: 第一 : WindowsHosting 和 .Net Core SDK的版本不一致导致;重新注重安装; 第二 :服务器缺补丁;验证 dotnet 是否能正常使用,在cmd中 进入 C:\Program Files\dotnet>dotnet --version cmd 报错3:提示 api ms win crt runtime 1-1-0.dll 丢失,dotnet 启动程序失败。 安装 vc_redist.x64 (Visual C++ Redistributable for Visual Studio 2015) 后还有错误: Files\dotnet\host\fxr\1.0.1\hostfxr.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 报错4:Files\dotnet\host\fxr\1.0.1\hostfxr.dll], HRESULT: 0x80070057】错误 win2008server R2 x64 部署.net core到IIS上出现【Failed to load the dll from [C:\Program Files\dotnet\host\fxr\1.0.1\hostfxr.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 https://www.cnblogs.com/Asahi1223/p/9936352.html
50000+
5万行代码练就真实本领
17年
创办于2008年老牌培训机构
1000+
合作企业
98%
就业率

联系我们

电话咨询

0532-85025005

扫码添加微信