天天看點

阿裡雲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

安裝成功

三、釋出項目

阿裡雲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