Inside the Standard Bindings: NetNamedPipe

Index for bindings in this series:

Part 3 of the series detailing the standard bindings (Part 1 was on BasicHttp and Part 2 was on NetTcp). The standard binding for named pipes is very similar to the standard binding for TCP. Named pipes are simpler because the WCF implementation is only meant for on-machine use and consequently there are fewer exposed features. The most notable difference is that the Security.Mode setting only offers the None and Transport options. SOAP security support is not an included option.

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.

Like TCP, there's three binding elements in the channel stack when Security.Mode is set to None.

  1. System.ServiceModel.Channels.TransactionFlowBindingElement

     TransactionProtocol: OleTransactions
    
  2. System.ServiceModel.Channels.BinaryMessageEncodingBindingElement

     AddressingVersion: Addressing10 (https://www.w3.org/2005/08/addressing)
    MaxReadPoolSize: 64
    MaxSessionSize: 2048
    MaxWritePoolSize: 16
    ReaderQuotas: 
      MaxArrayLength: 16384
      MaxBytesPerRead: 4096
      MaxDepth: 32
      MaxNameTableCharCount: 16384
      MaxStringContentLength: 8192
    
  3. System.ServiceModel.Channels.NamedPipeTransportBindingElement

     ConnectionBufferSize: 8192
    ConnectionPoolGroupName: default
    HostNameComparisonMode: StrongWildcard
    IdleTimeout: 00:02:00
    ManualAddressing: False
    MaxBufferPoolSize: 524288
    MaxBufferSize: 65536
    MaxInboundConnections: 10
    MaxOutboundConnectionsPerEndpoint: 10
    MaxOutputDelay: 00:00:00.2000000
    MaxPendingAccepts: 1
    MaxReceivedMessageSize: 65536
    Scheme: net.pipe
    TransferMode: Buffered
    

Along with the usual collection of settings that are only available through the binding itself.

 CloseTimeout: 00:01:00
EnvelopeVersion: Soap12 (https://www.w3.org/2003/05/soap-envelope)
MaxConnections: 10
Namespace: https://tempuri.org/
OpenTimeout: 00:01:00
ReceiveTimeout: 00:01:00
SendTimeout: 00:01:00
TransactionFlow: False

Switching the security mode setting to Transport does the same transformation for named pipes as it did for TCP. A new binding element is inserted to supply transport security, with no changes to either the binding element for the transport or the scheme of the binding.

  1. System.ServiceModel.Channels.TransactionFlowBindingElement

  2. System.ServiceModel.Channels.BinaryMessageEncodingBindingElement

  3. System.ServiceModel.Channels.WindowsStreamSecurityBindingElement

     ProtectionLevel: EncryptAndSign
    
  4. System.ServiceModel.Channels.NamedPipeTransportBindingElement

Next time: Understanding the Syntax for URLs