SelfCert wcf中 生成x5.09证书的工具

http://blog.pluralsight.com/selfcert-create-a-self-signed-certificate-interactively-gui-or-programmatically-in-net

 

下载链接

https://s3.amazonaws.com/pluralsight-free/keith-brown/samples/SelfCert.zip

 

该工具的使用方法

http://www.codeproject.com/Articles/96028/WCF-Service-with-custom-username-password-authenti

Installing the certificate

Download the Pluralsight SelfCert from the link given at the beginning of the article. Run the tool as Administrator; otherwise, it will crash.

Configure the settings to install the certificate; refer the screen below.

After making the required changes, click the Save button and then you will see the screen below:

 

After the installation of the certificate, browse the site again, but this time, you should see a different error as shown in the screen below:

 

 

This error means that the default application pool does not have access rights to the certificate's private key, so now, we have to give read access to the default application pool to do this.

Download WinHttpCertCfg.exe from the link given at the beginning of the article. This tool is a command line tool. After installing the tool, run the following command on the command prompt as Administrator.

 

C:\Program Files (x86)\Windows Resource Kits\Tools>winhttpcertcfg -g -c LOCAL_MACHINE\My -s MyWebSite -a DefaultAppPool

但是这个命令执行会出错,提示No account information was found.

 

参考http://www.cnblogs.com/wuhuacong/archive/2012/07/09/2582297.html文章中的命令

 

C:\Program Files (x86)\Windows Resource Kits\Tools>winhttpcertcfg -g -c LOCAL_MACHINE\My -s MyWebSite -a "NETWORKSERVICE"
Microsoft (R) WinHTTP Certificate Configuration Tool
Copyright (C) Microsoft Corporation 2001.

Matching certificate:
CN=MyWebSite

Granting private key access for account:
NT AUTHORITY\NETWORK SERVICE

 

 这样就可以正常访问了,但是不知道是不是会有其他的问题

作者:Chuck Lu    GitHub    
posted @   ChuckLu  阅读(1383)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示