Bindings(Essential Windows Communication Foundation)

本文详细介绍了Windows Communication Foundation(WCF)中各种绑定的使用场景,包括netTcpBinding用于跨机器通信,netNamedPipeBinding用于同一机器上的进程间通信,以及不同类型的HTTP绑定如basicHttpBinding、ws2007HttpBinding和wsHttpBinding等,适用于不同的WS-*标准和服务需求。此外,还提到了如何使用预配置绑定或创建自定义绑定,以及如何利用多种绑定来优化与不同客户端之间的通信。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  Here are some guiding principles for working channels and bindings within WCF:
  • The netTcpBinding binding is used for cross-machine communication between .NET applications.
  • The netNamedPipeBinding binding is used for all on-machine communication between .NET applications. This includes both interprocess and intraprocess (that is, inter-appdomain and intra-appdomain) communication.

  • The basicHttpBinding binding supports legacy Web services based on the WS-I Basic Profile 1.1 standard. This binding is typically used to consume ASP.NET ASMX Web services. It can also be used to expose services to .NET 2.0 clients that do not need WS-* support.

  • The ws2007HttpBinding and wsHttpBinding bindings are used to create Web services that support the WS-* specifications. The ws2007HttpBinding binding should be the default binding used to create Web services within WCF. It supports the latest WS-* standards

for messaging, security, reliable messaging, and transactions.

  • There are three additional bindings based on Web services: wsDualHttpBinding, wsFederationHttpBinding and ws2007FederationHttpBinding. Use these if you need to support duplex messaging over HTTP or federated security, respectively. The ws2007FederationHttpBinding binding shipped with .NET 3.5 and has additional support for WSS SAML Token Profile 1.1.

  • The netMsmqBinding  binding is used to develop disconnected applications using Microsoft Message Queue (MSMQ).

  • The msmqIntegrationBinding binding is used to integrate with existing applications built using MSMQ.

  • The channel stack within WCF is composable and allows for the creation of custom bindings. Custom bindings can be used to support

communication needs not supported by the preconfigured bindings.

  • WCF supports exposing services over multiple bindings. This allows for optimal communication between a variety of different clients

and the server.

  • Use one of the preconfigured bindings if it meets your needs; otherwise, you can create a custom binding using the CustomBinding class. 

转载于:https://www.cnblogs.com/zhtf2014/archive/2010/03/31/1701314.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值