https-配置使用HTTPS的ASP.NET Web应用

有关HTTPS、SSL以及SSL证书的工作原理,参见

《HTTPS-HTTPS原理》

《HTTPS-SSL证书》

《HTTPS-攻击实例与防御》

本文将演示如何在IIS中配置一个HTTPS的ASP.NET Web Application。

 

(1)打开Internet Information Services (IIS) Manager

image

 

(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。

image

image

image

image

 

(3)在IIS中添加一个Website

 Binding下Type选择https,默认端口为443(http默认端口为80),SSL Certificate选择上面我们创建的self-signed certificate。

image

 

(4)也可以用添加Site Binding的方式实现

image

 

点击Add

image

image

 

(5)打开浏览器

image

 

点击地址栏旁边的小锁头,查看一下证书

image

image

image

 

(6)打开证书管理工具,查看Trusted Root Certification Authorities

image

 

可以看到在IIS中创建self-signed certificate的时候,服务器已经将它添加到Trusted Root CA中了。在客户端,你需要手动安装根证书。

image

 

(7)证书颁发机构

如果想使用浏览器信任的证书,需要使用证书颁发机构 (CA)颁发给你的证书,比如Verisign,Thawte等。Self-signed Certificate可以用于开发测试环境,不应用于生产环境。

原文链接:http://www.cnblogs.com/jfzhu/p/4064654.html

posted on   itjeff  阅读(824)  评论(0编辑  收藏  举报

编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2018-12-12 彻底理解js中的闭包
2014-12-12 在LINQ中实现多条件联合主键LEFT JOIN
2014-12-12 LINQ的左连接、右连接、内连接

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示