• WCF绑定(Binding)


    一个Binding由一个有序的binding元素栈所组成,其中的每一个元素都指定了连接到ServiceEndpoint的一个方面。在这个栈中的最底两层都是必须要有的。最底下的一层是传输binding元素,在它之上是用于指定编码规范的binding元素。

    一个Binding中的元素可以分为三类:协议、传输与编码, 它们分别可以指定如下信息:

    •  协议栈元素指定诸如安全性、可靠性、上下文流设置(context flow settins);
    • 传输中指定底层的传输协议,如TCP或是HTTP。
    • 编码中指定发送到ServiceEndpoint中的消息编码,如Text/XML, Binary或是MTOM。

    WCF预定义了一些Binding,它们在互操作性(Interoperability), 安全性(Security), 是否支持会话(Session), 是否支持事务(Transactions)和是否为全双工(Duplex)上各有不同。

    BindingConfiguration ElementDescription

    BasicHttpBinding

    basicHttpBinding Element

    A binding that is suitable for communicating with WS-Basic Profile conformant Web Services, for example, ASMX-based services. This binding uses HTTP as the transport and Text/XML as the default message encoding.

    WSHttpBinding

    wsHttpBinding Element

    A secure and interoperable binding that is suitable for non-duplex service contracts.

    WSDualHttpBinding

    wsDualHttpBinding Element

    A secure and interoperable binding that is suitable for duplex service contracts or communication through SOAP intermediaries.

    WSFederationHttpBinding

    wsFederationHttpBinding element

    A secure and interoperable binding that supports the WS-Federation protocol, enabling organizations that are in a federation to efficiently authenticate and authorize users.

    NetTcpBinding

    netTcpBinding Element

    A secure and optimized binding suitable for cross-machine communication between WCF applications.

    NetNamedPipeBinding

    netNamedPipeBinding Element

    A secure, reliable, optimized binding that is suitable for on-machine communication between WCF applications.

    NetMsmqBinding

    netMsmqBinding Element

    A queued binding that is suitable for cross-machine communication between WCF applications.

    NetPeerTcpBinding

    netPeerTcpBinding element

    A binding that enables secure, multi-machine communication.

    MsmqIntegrationBinding

    msmqIntegrationBinding element

    A binding that is suitable for cross-machine communication between an WCF application and existing MSMQ applications.

    BindingInteroperabilitySecurity (Default)Session (Default)TransactionsDuplex

    BasicHttpBinding

    Basic Profile 1.1

    (None), Transport, Message,

    None, (None)

    (None)

    n/a

    WSHttpBinding

    WS

    Transport, (Message), Mixed

    (None), Transport, Reliable Session

    (None), Yes

    n/a

    WSDualHttpBinding

    WS

    (Message)

    (Reliable Session)

    (None), Yes

    Yes

    WSFederationHttpBinding

    WS-Federation

    (Message)

    (None), Reliable Session

    (None), Yes

    No

    NetTcpBinding

    .NET

    (Transport), Message

    Reliable Session, (Transport)

    (None), Yes

    Yes

    NetNamedPipeBinding

    .NET

    (Transport)

    None, (Transport)

    (None), Yes

    Yes

    NetMsmqBinding

    .NET

    Message, (Transport), Both

    (None)

    (None), Yes

    No

    NetPeerTcpBinding

    Peer

    (Transport)

    (None)

    (None)

    Yes

    MsmqIntegrationBinding

    MSMQ

    (Transport)

    (None)

    (None), Yes

    n/a

  • 相关阅读:
    C# 访问AD查询用户信息
    js UTC时间转本地时间
    Silverlight中的序列化和反序列化
    ASP.NET FORM认证配置排错记录
    opencv中cvSetData用法
    WS2812B-64位 8*8位 RGB LED点阵
    1602 LCDKeypad Shield
    Wemos D1 使用ESP8266 板载存储
    Wemos D1 ESP8266的网络工作模式
    Wemos D1 1602 液晶屏幕
  • 原文地址:https://www.cnblogs.com/tianciliangen/p/7440917.html
Copyright © 2020-2023  润新知