Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I convert a basicHttpBinding to a customBinding

Tags:

wcf

I've been working on converting a basicHttpBinding to a customBinding to get my client working on a web farm. I've been fumbling translating the following security section.

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

I'd show you my translation, but what I've been able to fathom is really undereducated guessing. I will also continue doing some more independent research via the web.

like image 623
David Avatar asked Feb 11 '09 15:02

David


2 Answers

This tool converts automatically your binding into a customBinding.

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

like image 169
Gonzalo Gallotti Avatar answered Sep 23 '22 05:09

Gonzalo Gallotti


Ok, I figured this out, didn't need to even use the security section in the custombinding, everything I need to set was on the <httpsTransport/> element itself. I've cut out all the non important bits.

<customBinding>
    <binding name="viaLoadBalancers">

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

        <httpsTransport
            authenticationScheme="Anonymous"
            requireClientCertificate="true"
        />
    </binding>
</customBinding>
like image 24
David Avatar answered Sep 24 '22 05:09

David