如何将basicHttpBinding转换为customBinding

时间:2009-02-11 15:24:52

标签: wcf

我一直在努力将basicHttpBinding转换为customBinding,以使我的客户端在Web场上工作。我一直在摸索翻译以下安全部分。

<basicHttpBinding ...>
   <security mode="Transport">
      <transport clientCredentialType="Certificate">
   </security>
</basicHttpBinding>
<behaviors>
   <behavior>
      <clientCredentials>
         <clientCertificate
            x509FindType="FindBySerialNumber"
            findValue="..."
         />
      </clientCredentials>
   <behavior>
</behaviors>

我会告诉你我的翻译,但我能够理解的是真正无法猜测的猜测。我还将继续通过网络进行更多的独立研究。

2 个答案:

答案 0 :(得分:6)

此工具会自动将您的绑定转换为customBinding。

http://webservices20.cloudapp.net/default.aspx

答案 1 :(得分:4)

好的,我想出来了,甚至不需要使用自定义绑定中的安全部分,我需要设置的所有内容都在&lt; httpsTransport /&gt;上。元素本身。我已经删除了所有非重要的位。

<customBinding>
    <binding name="viaLoadBalancers">

        <textMessageEncoding 
            messageVersion="Soap11" 
            writeEncoding="utf-8"
        />

        <httpsTransport
            authenticationScheme="Anonymous"
            requireClientCertificate="true"
        />
    </binding>
</customBinding>
相关问题