Inside the Standard Bindings: WSDualHttp
After a few days break, the series on standard bindings continues. This week will take care of the remainder of the HTTP bindings, leaving only the MSMQ and PeerChannel bindings to talk about. WSDualHttp features the same support for Web Service protocols as the WSHttp binding, but is designed for use with duplex contracts.
Standard disclaimer:
I've cut down on the number of properties presented by eliminating duplicates between the binding settings and binding element settings. For instance, the XML reader quotas can be set on either the binding or the message encoder binding element, but I'm only going to show them on the message encoder. I've also omitted most of the security credential settings because they're very messy and you hopefully won't need to change them much.
Unlike WSHttp, WSDualHttp only supports SOAP security. I'll start off with the settings when no security is being used. The other two big differences you'll see between WSHttp and WSDualHttp is that the dual variety makes Reliable Messaging mandatory and adds a CompositeDuplex binding element to provide the duplex shape.
- System.ServiceModel.Channels.TransactionFlowBindingElement
TransactionProtocol: WSAtomicTransactions
- System.ServiceModel.Channels.ReliableSessionBindingElement
AcknowledgementInterval: 00:00:00.2000000
EnableFlowControl: True
InactivityTimeout: 00:10:00
MaxPendingChannels: 128
MaxRetryCount: 8
MaxTransferWindowSize: 32
Ordered: True
- System.ServiceModel.Channels.CompositeDuplexBindingElement
ClientBaseAddress:
- System.ServiceModel.Channels.TextMessageEncodingBindingElement
AddressingVersion: Addressing10 (http://www.w3.org/2005/08/addressing)
MaxReadPoolSize: 64
MaxWritePoolSize: 16
ReaderQuotas:
MaxArrayLength: 16384
MaxBytesPerRead: 4096
MaxDepth: 32
MaxNameTableCharCount: 16384
MaxStringContentLength: 8192
- System.ServiceModel.Channels.HttpTransportBindingElement
AllowCookies: False
AuthenticationScheme: Anonymous
BypassProxyOnLocal: False
HostNameComparisonMode: StrongWildcard
ManualAddressing: False
MappingMode: SoapWithWSAddressing
MaxBufferPoolSize: 524288
MaxBufferSize: 65536
MaxReceivedMessageSize: 65536
ProxyAddress:
ProxyAuthenticationScheme: Anonymous
Realm:
Scheme: http
TransferMode: Buffered
UnsafeConnectionNtlmAuthentication: False
UseDefaultWebProxy: True
The CompositeDuplex element creates the back channel from the server to the client using the base address setting. Most configuration settings are unchanged from the ones used with the WSHttp binding except that there is no longer a switch to disable reliable sessions.
CloseTimeout: 00:01:00
EnvelopeVersion: Soap12 (http://www.w3.org/2003/05/soap-envelope)
Namespace: http://tempuri.org/
OpenTimeout: 00:01:00
ReceiveTimeout: 00:01:00
SendTimeout: 00:01:00
TextEncoding: System.Text.UTF8Encoding
TransactionFlow: False
Setting the Security.Mode to Message makes exactly the same transformation as we've seen with the other standard bindings.
- System.ServiceModel.Channels.TransactionFlowBindingElement
- System.ServiceModel.Channels.ReliableSessionBindingElement
- System.ServiceModel.Channels.SymmetricSecurityBindingElement
- System.ServiceModel.Channels.CompositeDuplexBindingElement
- System.ServiceModel.Channels.TextMessageEncodingBindingElement
- System.ServiceModel.Channels.HttpTransportBindingElement
The same holds true for changing the message encoding to use MTOM.
- System.ServiceModel.Channels.TransactionFlowBindingElement
- System.ServiceModel.Channels.ReliableSessionBindingElement
- System.ServiceModel.Channels.CompositeDuplexBindingElement
- System.ServiceModel.Channels.MtomMessageEncodingBindingElement
- System.ServiceModel.Channels.HttpTransportBindingElement
Next time: Inside the Standard Bindings: WSFederationHttp