Click here to Skip to main content
15,860,972 members
Articles / Webservice
Tip/Trick

WCF Binding Box: Converting WsHttpBinding to a Custombinding

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
12 Apr 2010CPOL 33.9K   9   4
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)


Written By
Software Developer (Senior)
Israel Israel
Web services interoperability expert.

http://webservices20.blogspot.com/

Comments and Discussions

 
QuestionOnline tool not available Pin
Member 275163410-Apr-19 3:36
Member 275163410-Apr-19 3:36 
AnswerRe: Online tool not available Pin
Member 146173479-Oct-19 4:24
Member 146173479-Oct-19 4:24 
Questionrofl as usual another sob foreignor copy and paste Pin
ass nigger27-Aug-13 10:31
professionalass nigger27-Aug-13 10:31 
GeneralReason for my vote of 5 worked like a charm Pin
Jenzo12-Jan-12 10:00
Jenzo12-Jan-12 10:00 

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

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