Step by Step 配置使用HTTPS的ASP.NET Web應用

來源:互聯網
上載者:User

標籤:style   blog   http   io   os   ar   使用   for   sp   

原創地址:http://www.cnblogs.com/jfzhu/p/4064654.html                               

轉載請註明出處

 

有關HTTPS、SSL以及SSL認證的工作原理,參見

《HTTPS那些事(一)HTTPS原理》

《HTTPS那些事(二)SSL認證》

《HTTPS那些事(三)攻擊執行個體與防禦》

本文將示範如何在IIS中配置一個HTTPS的ASP.NET Web Application。

 

(1)開啟Internet Information Services (IIS) Manager

 

(2)建立一個Self-Signed Certificate

A self-signed certificate is an identity certificate that is signed by its own creator. Certificates are signed by Certificate Authority. In general self signed certificates are fine for testing purpose but not for production.

建立self-signed certificate有兩種方式:

  • 使用IIS
  • 使用Visual Studio的工具MakeCert.exe

本文只示範如何用IIS建立self-signed certificate。

開啟IIS Manager後,雙擊Server Certificates。

 

(3)在IIS中添加一個Website

 Binding下Type選擇https,預設連接埠為443(http預設連接埠為80),SSL Certificate選擇上面我們建立的self-signed certificate。

 

(4)也可以用添加Site Binding的方式實現

 

點擊Add

 

(5)開啟瀏覽器

 

點擊地址欄旁邊的小鎖頭,查看一下認證

 

(6)開啟認證管理工具,查看Trusted Root Certification Authorities

 

可以看到在IIS中建立self-signed certificate的時候,伺服器已經將它添加到Trusted Root CA中了。在用戶端,你需要手動安裝根憑證。

 

(7)憑證授權單位

如果想使用瀏覽器信任的認證,需要使用憑證授權單位 (CA)頒發給你的認證,比如Verisign,Thawte等。Self-signed Certificate可以用於開發測試環境,不應用於生產環境。

Step by Step 配置使用HTTPS的ASP.NET Web應用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.