1,生成加密证书
用VisualStudio 中 MakeCert.exe 的工具生成加密证书。
MakeCert.exe -sr localmachine -ss My -n CN=localhost,OU=https://localhost -sky exchange -pe -r localhost.cer
2,查看生成好的加密证书的『Thumbprint hash』

3,用 httpcfg 命令将加密证书和SSL端口关联好。
关联 httpcfg set ssl -i [ip]:[port] -h [thumbprint hash]
解除关联 httpcfg delete ssl –i [ip]:[port]
C:\Documents and Settings\Administrator>httpcfg query ssl
C:\Documents and Settings\Administrator>httpcfg set ssl -i 0.0.0.0:10180 -h 59ab8e12f1dbf43060684932c1bb570874049c09
HttpSetServiceConfiguration completed with 0.
C:\Documents and Settings\Administrator>httpcfg query ssl
IP : 0.0.0.0:10180
Hash

本文介绍了如何为WCF服务配置HTTPS支持,包括使用MakeCert.exe生成证书,查看并关联加密证书的Thumbprint hash,设置URLACL,以及调整WCF配置文件的详细步骤。
最低0.47元/天 解锁文章
296

被折叠的 条评论
为什么被折叠?



