- Microsoft Dynamics AX 2012 R2 Services
- Klaas Deforche Kenny Saelen
- 421字
- 2021-07-16 12:13:05
Bindings
When a client and service communicate, there are several aspects to the communication.
- Synchronous/asynchronous: Messages can be used in a request/response pattern or they can be used in asynchronous communication depending on whether the client waits for the response or not.
- Transport protocol: The protocol used for transporting the messages can vary depending on the needs. Protocols such as HTTP, Transmission Control Protocol (TCP), Microsoft Message Queuing (MSMQ), and Inter-process communication (IPC) can be used.
- Encoding: You have a choice on how to encode the messages. You can choose to use plain text if you want maximum interoperability. Alternatively, you can use binary encoding to speed up performance, or using the Message Transport Optimization Mechanism (MTOM) to handle larger payloads.
- Security: There are also some options that can be used to handle security and authentication. Security can be implemented at the transport level, at the message level, or can be skipped altogether.
As you can imagine, keeping track of all of the options can be a little difficult, and making the right choice on how to configure the different settings is not easy. To solve this, WCF introduces bindings. A binding is merely a grouping of choices that deal with each aspect of the communication that we just discussed.
WCF supports several bindings out of the box. If these do not suffice, there is always the alternative of creating a custom binding of your own. The following are the most commonly used bindings:
NetTcpBinding
: This uses the TCP protocol and is mainly used for cross-machine communication over an intranet. It is WCF-optimized and thus requires both the client and the server to use WCF.BasicHttpBinding
: This binding is used to expose a service as an ASMX web service so that older clients that comply with WS-I Basic Profile 1.1 are supported.WsHttpBinding
: This binding is used for communication over the Internet. It uses the HTTP and HTTPS protocols and complies withWS-*
standards. So, any party that supports theWS-*
standards is able to communicate with the service.NetMsmqBinding
: This type of binding will be used when support is needed for MSMQ queues. TheNetMsmqBinding
binding is actually a compact binding that does not provide all of the possible options to configure MSMQ. There are other bindings that provide more options.
Now that we have elaborated on some of the out-of-the-box bindings, you are probably asking yourself, how can I make sure I'm using the appropriate binding for my scenario? Well, the following flowchart may help you with this choice:

- 中國國民經(jīng)濟(jì)核算體系修訂問題研究
- 一本書學(xué)內(nèi)部審計(jì):新手內(nèi)部審計(jì)從入門到精通
- 汪博士詳解PMP?模擬題(第4版)
- Citrix XenApp? 7.5 Desktop Virtualization Solutions
- 金融保險(xiǎn)集團(tuán)內(nèi)部審計(jì)創(chuàng)新與實(shí)踐
- Splunk:Enterprise Operational Intelligence Delivered
- 陜西文物年鑒·2015
- Learning Microsoft Azure
- 從零開始學(xué)房地產(chǎn)會(huì)計(jì)
- 成功通過PMP(第3版)
- 陜西國家統(tǒng)計(jì)調(diào)查市、縣優(yōu)秀報(bào)告集萃(2006—2015)(上下)
- 統(tǒng)計(jì)學(xué)理論前沿(谷臻小簡·AI導(dǎo)讀版)
- 統(tǒng)計(jì)原理與實(shí)務(wù)
- 效益實(shí)現(xiàn)管理實(shí)踐指南
- 財(cái)務(wù)會(huì)計(jì)習(xí)題集