Saturday, June 9, 2012

Windows Communcation Foundation Bindings (WCF) Web Services Cheat Sheet

Windows Communcation Foundation Bindings (WCF) Web Services Cheat Sheet
  1. BasicHttpBinding - basic compatibility

    Basic SOAP 1.1
    A binding that is suitable for communicating with WS-Basic Profile conformant Web services, for example, ASP.NET Web services (ASMX)-based services. This binding uses HTTP as the transport and text/XML as the default message encoding.


    BasicHttpBinding was designed for scenarios where interoperability is of utmost importance. As a result, BasicHttpBinding uses HTTP for the transport and text for the message encoding. An important aspect of the message encoding is the expected message version, which happens to be SOAP 1.1 for BasicHttpBinding. As for additional protocols, BasicHttpBinding is capable of using transport or message security, but both are disabled by default. The other WS-* protocols are not supported with this binding. As a result, this binding produces a simple channel stack capable of interoperating with any other basic Web services implementation—and this is a great choice when your number-one priority is to make things work.

    WSHttpBinding - extended compatibility

    SOAP 1.2 along with WS-Addressing 1.0
    A secure and interoperable binding that is suitable for non-duplex service contracts.

    WSHttpBinding . This was also designed for interoperability while incorporating the richer Web services protocols for security, reliable messaging, and transactions. As a result, WSHttpBinding also uses HTTP for the transport and text for the message encoding, but it uses SOAP 1.2 along with WS-Addressing 1.0 for the message version—they are needed to carry the additional Web services protocol headers. The binding enables message-based security (via WS-Security and friends) and is capable of supporting WS-ReliableMessaging and WS-AtomicTransactions if you choose to enable them. WSHttpBinding produces a more sophisticated channel stack and will most likely be constrained to enterprise scenarios where integration across frameworks and platforms is required.

    NetTcpBinding - binary, secure, reliable .NET 

    "A secure and optimized binding suitable for cross-machine communication between WCF applications"
    .NET framework channel stack that will perform better in Windows environments, giving you a great option for replacing your various COM+ and .NET remoting investments.
    NetTcpBinding. Unlike the two HTTP bindings, the various "Net" bindings were not designed for interoperability. In fact, each was designed for optimizing a different communication scenario when you can safely assume you have the Microsoft® .NET Framework 3.0 installed on both sides (this explains why the binding names are prefixed with "Net").
    NetTcpBinding uses 
    • TCP transport,
    • binary message encoding
    • SOAP 1.2 for the message version.  
    • enables transport security by default 
    • can support transactions 

  2. the configuration of this binding focuses on creating a channel stack that will perform better in Windows environments, giving you a great option for replacing your various COM+ and .NET remoting investments.
  3. Windows Communcation Foundation Bindings

    msdn.microsoft.com/en-us/library/ms733027.aspx
    Bindings are used to specify the transport, encoding, and protocol details required for clients and services to communicate with each other. WCF uses bindings ...

    System Provided Bindings 



    System-Provided Bindings

    The following bindings are shipped with WCF.

    BindingConfiguration ElementDescription
    BasicHttpBinding
    A binding that is suitable for communicating with WS-Basic Profile conformant Web services, for example, ASP.NET Web services (ASMX)-based services. This binding uses HTTP as the transport and text/XML as the default message encoding.
    A secure and interoperable binding that is suitable for non-duplex service contracts.
    A secure and interoperable binding that provides support for the correct versions of the SecurityReliableSession, andTransactionFlow binding elements.
    A secure and interoperable binding that is suitable for duplex service contracts or communication through SOAP intermediaries.
    A secure and interoperable binding that supports the WS-Federation protocol, enabling organizations that are in a federation to efficiently authenticate and authorize users.
    A secure and interoperable binding that derives from WS2007HttpBinding and supports federated security.
    A secure and optimized binding suitable for cross-machine communication between WCF applications.
    A secure, reliable, optimized binding that is suitable for on-machine communication between WCF applications.
    A queued binding that is suitable for cross-machine communication between WCF applications.
    A binding that enables secure, multi-machine communication.
    A binding used to configure endpoints for WCF Web services that are exposed through HTTP requests instead of SOAP messages.
    A binding that is suitable for cross-machine communication between a WCF application and existing Message Queuing (also known as MSMQ) applications.

    Binding Features

    The next table shows some of the key features each of the system-provided bindings provided. The bindings are listed in the first column and information regarding the features is described in the table. The following table provides a key for the binding abbreviations used. To select a binding, determine which column satisfies all of the row features you need.

    BindingInteroperabilityMode of Security (Default)Session (Default)TransactionsDuplex
    BasicHttpBinding
    Basic Profile 1.1
    (None), Transport, Message, Mixed
    None, (None)
    (None)
    n/a
    WSHttpBinding
    WS
    None, Transport, (Message), Mixed
    (None), Transport, Reliable Session
    (None), Yes
    n/a
    WS2007HttpBinding
    WS-Security, WS-Trust, WS-SecureConversation, WS-SecurityPolicy
    None, Transport, (Message), Mixed
    (None), Transport, Reliable Session
    (None), Yes
    n/a
    WSDualHttpBinding
    WS
    None, (Message)
    (Reliable Session)
    (None), Yes
    Yes
    WSFederationHttpBinding
    WS-Federation
    None, (Message), Mixed
    (None), Reliable Session
    (None), Yes
    No
    WS2007FederationHttpBinding
    WS-Federation
    None, (Message), Mixed
    (None), Reliable Session
    (None), Yes
    No
    NetTcpBinding
    .NET
    None, (Transport), Message,
    Mixed
    Reliable Session, (Transport)
    (None), Yes
    Yes
    NetNamedPipeBinding
    .NET
    None,
    (Transport)
    None, (Transport)
    (None), Yes
    Yes
    NetMsmqBinding
    .NET
    None, Message, (Transport), Both
    (None)
    (None), Yes
    No
    NetPeerTcpBinding
    Peer
    None, Message, (Transport), Mixed
    (None)
    (None)
    Yes
    MsmqIntegrationBinding
    MSMQ
    None, (Transport)
    (None)
    (None), Yes
    n/a
    The following table explains the features found in the previous table.

    FeatureDescription
    Interoperability Type
    Names the protocol or technology with which the binding ensures interoperation.
    Security
    Specifies how the channel is secured:
    • None: The SOAP message is not secured and the client is not authenticated.
    • Transport: Security requirements are satisfied at the transport layer.
    • Message: Security requirements are satisfied at the message layer.
    • Mixed: This security mode is known as TransportWithMessageCredentials. It handles credentials at the message level, and integrity and confidentiality requirements are satisfied by the transport layer.
    • Both: Both message level and transport level security are used. This ability is unique to the NetMsmqBinding.
    Session
    Specifies whether this binding supports session contracts.
    Transactions
    Specifies whether transactions are enabled.
    Duplex
    Specifies whether duplex contracts are supported. Note this feature requires support for Sessions in the binding.
    Streaming
    Specifies whether the message streaming is supported.

Service Station: WCF Bindings In Depth

msdn.microsoft.com/en-us/magazine/cc163394.aspx


  1. System-Provided Bindings

    msdn.microsoft.com/en-us/library/ms730879.aspx
    Bindings specify the communication mechanism to use when talking to an endpoint and... Bindings. WCF Bindings Overview. System-Provided Bindings ...
  2. WCF Service Binding Explained

    www.c-sharpcorner.com/uploadfile/.../wcf-service-binding-explained...
    May 5, 2009 – This article offers a brief explanation on the basic concepts of the Communication part in the Windows Communication Foundation - WCF.
  3. WCF Bindings Needed For HTTPS - Scott's Blog

    weblogs.asp.net/srkirkland/.../wcf-bindings-needed-for-https.aspx
    Feb 20, 2008 – WCF Bindings Needed For HTTPS. I just finished writing my first production WCF application, which worked very well until I deployed it to our ...
  4. .net - WCF Bindings - so many! How do I choose one? - Stack Overflow

    stackoverflow.com/.../wcf-bindings-so-many-how-do-i-choose-one
    4 answers - Oct 26, 2008
    We have an R Server (R is a programming language used in statistical ... Personally, I'd recommend the simplest binding that gives what you ...
  5. Windows Communication Foundation (WCFBindings and How to ...

    answers.oreilly.com/.../1995-windows-communication-foundation-w...
    1 post - Aug 30, 2010
    The following excerpt from Programming WCF Services, Third Edition explains the various types of available bindings and how to use them.
  6. What is binding and how many types of bindings are there in WCF? ...

    www.dotnetfunda.com/.../exam288-what-is-binding-and-how-many-...
    Nov 13, 2008 – WCF supports nine types of bindings. Basic binding. Offered by the BasicHttpBinding class, this is designed to expose a WCF service as a ...
  7. What's In a WCF Binding, And What Can My Service Do Right Now ...

    blogs.msdn.com › Kirk Evans Blog
    Jan 9, 2008 – WCF service can listen on multiple endpoints. Each endpoint has 3 basic properties, the ABC's of WCF: Address, Binding, and Contract.

No comments:

Post a Comment