.net WCF获取证书编码值
我在WCF服务中使用证书,因此在web.Config中有一个编码值.net WCF获取证书编码值,.net,wcf,certificate,.net,Wcf,Certificate,我在WCF服务中使用证书,因此在web.Config中有一个编码值 <identity> <certificate encodedValue="large string!!!!!!!" /> </identity> 我想知道的是 这是推荐的方法吗 有没有我不知道的方法 编辑:Visual Studio不可用,我无法移动证书,因此它必须是非VS解决方案如果由第三方管理,则服务器证书将加载到Windows证书存储中,并作为服务行为的一部分进行选择 在服务行为
<identity>
<certificate encodedValue="large string!!!!!!!" />
</identity>
我想知道的是
编辑:Visual Studio不可用,我无法移动证书,因此它必须是非VS解决方案如果由第三方管理,则服务器证书将加载到Windows证书存储中,并作为服务行为的一部分进行选择 在服务行为中,您可以通过以下方式选择它在端点上使用的证书:
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceCredentials>
<serviceCertificate findValue="CN=myhost.mydomain.org" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
该元素用于连接客户端。只需在客户端解决方案中刷新代理的服务引用,identity元素应使用新证书的公共部分的编码值版本进行更新。这可以通过将证书(通过IIS或证书管理单元)导出到.cer文件而不使用base64格式的私钥来完成,然后在记事本中打开并将其复制粘贴到encodedValue中我应该说visual studio将不可用。哦。您可以在有VS可用的机器上重新创建代理,然后使用该配置中的条目。或者托管的计算机对外部世界不可见?
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceCredentials>
<serviceCertificate findValue="CN=myhost.mydomain.org" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>