首页 > 其他 > 详细

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

时间:2015-07-29 15:40:40      阅读:265      评论:0      收藏:0      [点我收藏+]

原文链接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

 

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

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

原文:http://www.cnblogs.com/chucklu/p/4685783.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!