繁体   English   中英

使用客户端证书将 WCF 服务引用添加到 Visual Studio 2022 项目

[英]Add WCF Service Reference to Visual Studio 2022 Project with Client Certificate

我正在尝试将 WCF Web 服务引用添加到 C# 项目,其中 ZE7F674EE60F6AB14CZ35F6CEB 证书被保护我已成功将证书添加到 SOAPUI 并进行了很好的调用,但是当我尝试在 Visual Studio 中添加引用时,我没有收到 select 证书的提示。

如何在 Visual Studio 2022 社区中添加需要客户端证书的 WCF 服务端点?

使用如下端点行为指定客户端证书:

<system.serviceModel>  
<behaviors>  
  <endpointBehaviors>  
    <behavior name="endpointCredentialsBehavior">  
      <clientCredentials>  
        <clientCertificate findValue="Cohowinery.com"
           storeLocation="LocalMachine"  
          x509FindType="FindBySubjectName" />  
      </clientCredentials>  
    </behavior>  
  </endpointBehaviors>  
</behaviors>
<bindings>  
  <wsHttpBinding>  
    <binding name="WSHttpBinding_ICalculator" >  
      <security mode="Message">  
        <message clientCredentialType="Certificate" />  
      </security>  
    </binding>  
  </wsHttpBinding>  
</bindings>  
<client>  
  <endpoint address="http://machineName/Calculator"
            behaviorConfiguration="endpointCredentialsBehavior"  
            binding="wsHttpBinding"  
            bindingConfiguration="WSHttpBinding_ICalculator"  
            contract="ICalculator"  
            name="WSHttpBinding_ICalculator">   
  </endpoint>  
</client> 

有关更多信息,请查看带有证书客户端的消息安全性带有证书身份验证的传输安全性

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM