Aishwarya Shiva
Aishwarya Shiva

Reputation: 3406

Why client config shows wsHttpBinding when I have customBinding on server?

I am using customBinding on my WCF web-service. But when I add service reference from Visual-Studio 2012, the configuration of the client shows wsHttpBinding as shown below:

<bindings>
    <wsHttpBinding>
        <binding name="CustomBinding_IService1" />
    </wsHttpBinding>
</bindings>

What is the reason behind this?

My full server config can be found here:How to make WCF service server-client time difference independent?

Upvotes: 1

Views: 611

Answers (1)

Yaron Naveh
Yaron Naveh

Reputation: 24406

Probably your custom binding is configured in a way that macthed the WSHttpBinding capabilities. According WCF Binding converter, this is the custom binding that matches ws http default settings:

<customBinding>
  <binding name="NewBinding0">
    <transactionFlow />
    <security authenticationMode="SecureConversation" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
      <secureConversationBootstrap authenticationMode="UserNameForSslNegotiated" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" />
    </security>
    <textMessageEncoding />
    <httpTransport />
  </binding>
</customBinding>

(your custom binding may be shorter since some of the above values are defaults so you may omit them)

Now - and this may be related to your other question - the time skew settings do not propogate with the WSDL from the server to the client. You need to manually configure them on both server and client.

Upvotes: 3

Related Questions