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

 

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值