网站案例展示怎么做,游戏推广公司,军人运动会官方网站建设目标,企业网站定制收费标准在准备WCF安全开发实践编程系列文章的时候#xff0c;制作证书出现这个问题。The certificate CNWCFHTTPS must have a private key that is capable of key exchange. The process must have access rights for the private key.证书必须有一个可以交换密钥的私钥#xff0c… 在准备WCF安全开发实践编程系列文章的时候制作证书出现这个问题。 The certificate CNWCFHTTPS must have a private key that is capable of key exchange. The process must have access rights for the private key. 证书必须有一个可以交换密钥的私钥进程必须有访问私钥的权限。【1】原因分析 就是证书访问权限导致的问题其次就是证书是否有密钥因为要使用密钥来解密消息。而且这个证书要安装受信任的机构里。 证书没有一个可以交换的私钥我们需要重新制作证书。类型是exchange.【2】类似问题 国内外也有很多网友遇到这个问题 The certificate CNtempCert must have a private key that is capable ... The certificate CNlocalhost must have a private key that is capable ... access rights for the private key ServiceCertificate - Private Key Permissions Service hosted in IIS 7 using net.msmq binding (WAS) - cant open ... 有可能有办这个的参考文章http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/8e1c3feb-56de-4366-8af5-3d526d4f4ce1/http://social.msdn.microsoft.com/forums/en-US/wcf/thread/ac4a69d1-af3e-495c-8068-cb25ad0bb146/http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/b1369589-5207-4438-bcb8-2cade616bc0e 【3】解决办法: 在Visual Studio 命令行工具里启动命令行窗口输入以下命令 1.制作一个证书。制作证书makecert -sr localmachine -ss My -n CNMyServerCer -sky exchange -pe -r。http://msdn.microsoft.com/zh-cn/library/aa702761.aspx exchange 表示密钥可以导入。 2.导出证书文件带密钥的pfx文件。使用mmc 3.导入证书到信任的人。 4.导入证书到信任的机构这个证书就被信任了。 这个问题WCF安全开发过程中会遇到大家多注意。 参考文章 1.http://social.microsoft.com/Forums/zh-CN/wcfzhchs/thread/857f4257-8f43-4c7d-baa6-d2cabba36372 本文转自 frankxulei 51CTO博客原文链接http://blog.51cto.com/frankxulei/320958如需转载请自行联系原作者