简体   繁体   中英

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?

Probably your custom binding is configured in a way that macthed the WSHttpBinding capabilities. According WCF Binding converte r, 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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