阿里云Windows Server 2012 部署 Asp.net core

一、安装准备


1、 检查开发环境asp.net core 版本(我的开发环境为: 2.1.104 )

阿里云Windows Server 2012 部署 Asp.net core

2、新建asp.net core MVC 项目,然后发布

阿里云Windows Server 2012 部署 Asp.net core

新建 asp.net core 2.0

阿里云Windows Server 2012 部署 Asp.net core

3、准备好阿里云“Windows Server 2012”系统,关于如何选项配置,请参阅服务器规格文档

点我领取阿里云2000元代金券,(阿里云优惠券的作用:购买阿里云产品,最后支付结算的时候,阿里云优惠券可抵扣一部分费用。

阿里云Windows Server 2012 部署 Asp.net core

二、安装IIS和Asp.net Core 环境
(1)安装IIS:步骤如下

阿里云Windows Server 2012 部署 Asp.net core

添加角色和功能向导

阿里云Windows Server 2012 部署 Asp.net core

安全性选项

把安全性这里面的都给勾选了,别遗漏了,这些都是重要的。

阿里云Windows Server 2012 部署 Asp.net core

常见http功能

这里面除了webDAV发布不用勾选,其他的都勾选。

阿里云Windows Server 2012 部署 Asp.net core

应用程序开发选项:确保选择.net 3.5、net 4.5、ISAPI扩展,勾选。

阿里云Windows Server 2012 部署 Asp.net core

IIS安装过程,等着就行了。

阿里云Windows Server 2012 部署 Asp.net core

(2)、安装 dotnet-sdk-2.1.104-win-x64.exe,此处sdk版本参照: 一、安装准备 ----–> 1、检查开发环境asp.net core 版本) | DotNetCore.2.0.8-WindowsHosting.exe

a、安装 DotNetCore.2.0.8-WindowsHosting.exe : 安装成功后,在IIS的模块组件里,多了一个AspNetCoreModule模块(%SystemRoot%system32inetsrvaspnetcore.dll)

安装成功后,在IIS的模块组件里,多了一个AspNetCoreModule模块(%SystemRoot%system32inetsrvaspnetcore.dll)

安装 dotnet-sdk-2.1.104-win-x64.exe

安装成功

点我领取阿里云2000元代金券,(阿里云优惠券的作用:购买阿里云产品,最后支付结算的时候,阿里云优惠券可抵扣一部分费用。

三、发布项目

阿里云Windows Server 2012 部署 Asp.net core

(1)、编辑"应用程序池"的"基本设置"(我这里的应用程序池名称是Test),修改".NET Framework 版本"为"无托管代码"

阿里云Windows Server 2012 部署 Asp.net core

(2)、如果浏览WEB,出现“HTTP Error 502.5 - Process Failure”的错误页面,“首先重启iis”,“不行的话重启服务器”,不然的话就是sdk版本不对(dotnet-sdk-2.1.104-win-x64.exe),重启服务器之后,看下图已经显示成功了。

阿里云Windows Server 2012 部署 Asp.net core

点我领取阿里云2000元代金券,(阿里云优惠券的作用:购买阿里云产品,最后支付结算的时候,阿里云优惠券可抵扣一部分费用。

分页阅读: 1 2