Click here to Skip to main content
Click here to Skip to main content

Tagged as

WCF Binding Box: Converting WsHttpBinding to a Custombinding

, 12 Apr 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
WCF Binding Box WCF Binding Box (online)Introduction Those of you who have worked with WCF can testify that: WCF configuration is hard. WCF security configuration is hard.After a while you get used to BasicHttpBinding or WSHttpBinding. But then comes a service which...
wcf binding box
WCF Binding Box

WCF Binding Box (online)

 
Introduction
Those of you who have worked with WCF can testify that:
  • WCF configuration is hard.
  • WCF security configuration is hard.
 
After a while you get used to BasicHttpBinding or WSHttpBinding. But then comes a service which requires some special tweak which is not available in the pre-defined bindings. For example, omitting the timestamp or
increasing any of the timeout intervals. In such cases
you should turn to a customBinding. But how are you going to get
a custom binding which is equivalent to your original one?
 
WCF Binding Box
The Wcf Binding Box is an online WCF binding converter.
You supply it with your current binding and it returns you an equivalent custom binding.
 
All you need to do is:
 
1. Paste your binding.
 
For example:
<bindings>
    <wsHttpBinding>
        <binding name="MyBinding">
            <security>
               <message clientCredentialType="UserName" />
            </security>
        </binding>
     </wsHttpBinding>
</bindings>
 
2. Click the "Convert to Custom Binding!" button.
 

 
3. Use the result binding in your code:
 
<customBinding>
    <binding name="NewBinding0">
        <transactionFlow />
        <security authenticationMode="SecureConversation" 
messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
            <secureConversationBootstrap authenticationMode="UserNameForSslNegotiated" 
messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" />
        </security>
        <textMessageEncoding />
        <httpTransport />
    </binding>
</customBinding>
 
More Information
Wcf Binding Box introduction
WCF Blog
 
The Author

 
Yaron Naveh (email) is a web services interoperability expert.
His blog contains information about interoperability of various frameworks (WCF, WSE, WSIT, Axis2...) and
deals with web services security, performance and testing.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Yaron Naveh
Software Developer (Senior)
Israel Israel
Web services interoperability expert.
 
http://webservices20.blogspot.com/
Follow on   Twitter

Comments and Discussions

 
Questionrofl as usual another sob foreignor copy and paste Pinmemberass nigger27-Aug-13 11:31 
GeneralReason for my vote of 5 worked like a charm PinmemberJenzo12-Jan-12 11:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141220.1 | Last Updated 12 Apr 2010
Article Copyright 2010 by Yaron Naveh
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid