Specifies a context for the NetTcpBinding that requires that the protection level be signed. The contextExchangeMechanism for NetTcpContextBinding is SOAPHeader.
<netTcpContextBinding> <binding closeTimeout="TimeSpan" contextProtectionLevel="EncryptAndSign/None/Sign" hostNameComparisonMode="StrongWildCard/Exact/WeakWildcard" listenBacklog="Integer" maxBufferPoolSize="integer" maxBufferSize="Integer" maxConnections="Integer" maxReceivedMessageSize="Integer" name="string" openTimeout="TimeSpan" portSharingEnabled="Boolean" receiveTimeout="TimeSpan" sendTimeout="TimeSpan" transactionFlow="Boolean" transactionProtocol="OleTransactions/WSAtomicTransactionOctober2004" transferMode="Buffered/Streamed/StreamedRequest/StreamedResponse" <reliableSession ordered="Boolean" inactivityTimeout="TimeSpan" enabled="Boolean" /> <security mode="Message/None/Transport/TransportWithCredential"> <transport clientCredentialType="Basic/Certificate/Digest/None/Ntlm/Windows" proxyCredentialType="Basic/Digest/None/Ntlm/Windows" realm="string" defaultClientCredentialType="Basic/Certificate/Digest/None/Ntlm/Windows" defaultProxyCredentialType="Basic/Digest/None/Ntlm/Windows" defaultRealm="string" /> <message clientCredentialType="Certificate/IssuedToken/None/UserName/Windows" algorithmSuite="Basic128/Basic192/Basic256/Basic128Rsa15/Basic256Rsa15/TripleDes/TripleDesRsa15/Basic128Sha256/Basic192Sha256/TripleDesSha256/Basic128Sha256Rsa15/Basic192Sha256Rsa15/Basic256Sha256Rsa15/TripleDesSha256Rsa15" establishSecurityContext="Boolean" negotiateServiceCredential="Boolean"/> </security> <readerQuotas maxArrayLength="Integer" maxBytesPerRead="Integer" maxDepth="Integer" maxNameTableCharCount="Integer" maxStringContentLength="Integer" /> </binding> </netTcpContextBinding>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
A valid ProtectionLevel value that specifies the desired protection level of the SOAP header used to propagate the context information. The default value is Sign.
Specifies the HTTP hostname comparison mode used to parse URIs. This attribute is of type T:System.ServiceModel.HostnameComparisonMode, which indicates whether the hostname is used to reach the service when matching on the URI. The default value is F:System.ServiceModel.HostnameComparisonMode.StrongWildcard, which ignores the hostname in the match.
A positive integer that specifies the maximum number of channels waiting to be accepted on the listener. Connections in excess of this limit are queued until space below the limit becomes available. The connectionTimeout attribute limits the time a client will wait to be connected before throwing a connection exception. The default is 10.
An integer that specifies the maximum buffer pool size for this binding. The default is 512 * 1024 bytes. Many parts of Windows Communication Foundation (WCF) use buffers. Creating and destroying buffers each time they are used is expensive, and garbage collection for buffers is also expensive. With buffer pools, you can take a buffer from the pool, use it, and return it to the pool once you are done. Thus the overhead in creating and destroying buffers is avoided.
A positive integer that specifies the maximum size, in bytes, of the buffer used to store messages in memory. If the buffer is full, excess data remains in the underlying socket until the buffer has room again. This value cannot be less than maxReceivedMessageSize attribute. The default is 65536. For more information, see MaxBufferSize.
An integer that specifies the maximum number of outbound and inbound connections the service will create/accept. Incoming and outgoing connections are counted against a separate limit specified by this attribute.
Inbound connections in excess of the limit are queued until a space below the limit becomes available.
Outbound connections in excess of the limit are queued until a space below the limit becomes available.
The default is 10.
A positive integer that specifies the maximum message size, in bytes, including headers, that can be received on a channel configured with this binding. The sender of a message exceeding this limit will receive a SOAP fault. The receiver drops the message and creates an entry of the event in the trace log. The default is 65536.
A string that contains the configuration name of the binding. This value should be unique because it is used as an identification for the binding. Starting with .NET Framework 4, bindings and behaviors are not required to have a name. For more information about default configuration and nameless bindings and behaviors, see Simplified Configuration and Simplified Configuration for WCF Services.
A Boolean value that specifies whether TCP port sharing is enabled for this connection. If this is false, each binding uses its own exclusive port. This setting is relevant only to services, because clients are not affected.
A Boolean value that specifies whether the binding supports flowing WS-Transactions. The default is false.
Specifies the transaction protocol to be used with this binding. Valid values are
The default is OleTransactions. This attribute is of type TransactionProtocol.
A TransferMode value that specifies whether messages are buffered or streamed or a request or response.
Defines the security settings for the binding. This element is of type NetTcpSecurityElement.
Defines the constraints on the complexity of SOAP messages that can be processed by endpoints configured with this binding. This element is of type XmlDictionaryReaderQuotasElement.
Specifies if reliable sessions are established between channel endpoints.
This element holds a collection of standard and custom bindings.
Windows Communication Foundation Bindings
Configuring System-Provided Bindings
Using Bindings to Configure Windows Communication Foundation Services and Clients