Blog Home  Sign In RSS 2.0 Atom 1.0 CDF  

  def Softwaremaker() :
         return "William Tay", "<Challenging Conventions />"

  knownType_Serialize, about = Softwaremaker()
 

 Saturday, April 02, 2005
« Perspectives on the Shared Source Initia... | Main | Google takes on the Email Storage War to a higher level »

As usual, I find the documentation of the Indigo CTP bits rather lacking. This is to-be-expected for any CTP Releases.

Besides the declaration of attributes, Indigo makes heavy use of configuration to enable an Aspected-Oriented style of programming (AOP). This is really good as it really separates the technical goo from the functional business gunk. This is all good BUT the documentation for the configuration section (plus the schematic view) is rather lacking from the CTP documentation.

However, thanks to the good people and program managers of the Indigo team, the off-line and community support is great for the CTP release. Mr. Maine (who is Steve to most ... ) has posted a list of the Indigo standard bindings and all their associated configuration options here. Great information. Thanks, Steve.

Mike Vernal, another great PM, has also responded to my distress calls on the public Indigo newsgroup by posting an even more detailed set of documentation (plus explanation !!! --- you rock, Mike !) from the OM documentation for NetProfileTcpBinding and WsProfileBinding. WsProfileDualHttpBinding is very similar to WsProfileBinding, and BasicProfileBinding is, in some senses, a small subset of WsProfileBinding.

I will post all the snippets here, in a note of reference to myself and hopefully to the others as well.


System.ServiceModel.NetProfileTcpBinding

The NetProfileTcpBinding is a secure, reliable, optimized binding suitable
for cross-machine communication.  By default it will generate a runtime
communication stack which will use WS-ReliableMessaging for reliability,
Windows Security for message security and authentication, TCP for message
delivery, and a Binary message encoding.  The security behavior is
configurable via the optional securityMode parameter.  The use of
WS-ReliableMessaging is configurable via the optional enableReliableSession
parameter.

// code
public class NetProfileTcpBinding : Binding
{
    public NetProfileTcpBinding() { }
    public NetProfileTcpBinding(NetProfileTcpSecurityMode securityMode) { }
    public NetProfileTcpBinding(NetProfileTcpSecurityMode securityMode,
bool enableReliableSession) { }

    public ContextFlowOption FlowLocale { get; set; }
    public ContextFlowOption FlowLogicalThreadId { get; set; }
    public ContextFlowOption FlowTransactions { get; set; }
    public HostnameComparisonMode HostnameComparisonMode { get; set; }
    public int MaxBufferSize { get; set; }
    public int MaxConnections { get; set; }
    public long MaxMessageSize { get; set; }
    public SocketProtectionLevel IPv6SocketProtectionLevel { get; set; }
    public bool KeepAliveEnabled { get; set; }
    public bool OrderedSession { get; set; }
    public bool ReliableSessionEnabled { get; set; }
    public NetProfileTcpSecurityMode SecurityMode { get; set; }
    public TransferAssurances SessionAssurances { get; set; }
    public TimeSpan SessionConnectTimeout { get; set; }
    public TimeSpan SessionInactivityTimeout { get; set; }
    public EnvelopeVersion SoapVersion { get; }
    public bool TcpPortSharingEnabled { get; set; }
    public ProtectionLevel TcpProtectionLevel { get; set; }
    public TimeSpan TransferTimeout { get; set; }
    public TransferMode TransferMode { get; set; }
    public WSSecurityOverTcp WSSecurity { get; }
}

public NetProfileTcpBinding()

Instantiates a new instance of the NetProfileTcpBinding.  By default,
Windows Security will be used to secure communication (i.e., SecurityMode
will be TcpWithWindowsSe-curity) and reliable sessions will be disabled
(EnableReliableSession will be false).

public NetProfileTcpBinding(NetProfileTcpSecurityMode securityMode)

Instantiates a new instance of the NetProfileTcpBinding with the specified
securityMode value.  By default, reliable sessions will be disabled
(EnableReliableSession will be false).

public NetProfileTcpBinding(NetProfileTcpSecurityMode securityMode, bool
enableReliableSession)

Instantiates a new instance of the NetProfileTcpBinding with the specified
securityMode and enableReliableSession values.

public ContextFlowOption FlowLocale

The FlowLocale property allows you to get or set whether the client's
locale should be flowed to the server, and whether the server should
accept, ignore or reject it.  The de-fault value is
ContextFlowOption.NotAllowed, indicating that clients will not flow
lo-cale, and services will reject messages with a flowed locale.

public ContextFlowOption FlowLogicalThreadId

The FlowLogicalThreadId property allows you to get or set whether the
client's logical Thread Id should be flowed to the server, and whether the
server should accept, ignore or reject it.  The default value is
ContextFlowOption.NotAllowed, indicating that clients will not flow locale,
and services will reject messages with a flowed logical Thread ID.  This
value is useful in the context of ConcurrencyMode.Reentrant, as reentrancy
uses the logical Thread ID to determine which calls may "re-enter" the
synchronized context and which calls must wait.

public ContextFlowOption FlowTransactions

The FlowTransactions property allows you to get or set whether this binding
should sup-port flowing WS-Transactions.  The default value is
ContextFlowOption.NotAllowed, indicating that clients will not flow
transactions, and services will reject messages with a flowed transaction
message header.

public HostnameComparisonMode HostnameComparisonMode

The HostnameComparisonMode property allows you to get or set whether a
binding instance should be reachable via any valid machine name, or only
the endpoint's configured hostname.  The default value is StrongWildcard.

public SocketProtectionLevel IPv6SocketProtectionLevel

The IPv6SocketProtectionLevel propery allows you to configure the value of
the IPV6_PROTECTION_LEVEL socket option that is used to construct the
underlying socket.  This is useful for configuring firewall traversal
technologies such as Teredo.  The default value is
SocketProtectionLevel.Default.

public bool KeepAliveEnabled

The KeepAliveEnabled property allows you to get or set whether or not
TCP-level KeepAlive should be used.  This is useful if your TCP connection
is traversing an IP in-termediary that will timeout idle connections (e.g.,
certain firewalls, NATs, proxies, etc.).   The default value is false.

public int MaxBufferSize

The MaxBufferSize property allows you to get or set the maximum number of
bytes that will be used to buffer incoming messages in memory.  If you
receive more data than you can buffer, that data will remain on the
underlying socket until your buffer again has room.  This value cannot be
less than MaxMessageSize.  The default value is 65,536 (64k).

public int MaxConnections

The MaxConnection property allows you to get or set the maximum number of
TCP connections. The default value is 10.

public long MaxMessageSize

The MaxMessageSize property allows you to get or set the maximum size for
messages processed by a binding instance.  The default value is 64k
(65,536).

public bool OrderedSession

The OrderedSession property allows you to get or set whether this binding
should guarantee in-order delivery of messages.  This value is only
relevant if sessions are enabled (via the ReliableSessionEnabled property).
 The default value is true.

public bool ReliableSessionEnabled

The ReliableSessionEnabled property allows you get or set whether
WS-ReliableMessaging should be used to create sessionful channels.  The
default value is false, indicating that this binding will not support
sessionful channels.

public NetProfileTcpSecurityMode SecurityMode

The SecurityMode property allows you to get or set the type of security to
be used with this binding.  The default value is
NetProfileTcpSecurityMode.TcpWithWindowsSecurity. 

public TransferAssurances SessionAssurances

The SessionAssurances property allows you to get or set the message
delivery guarantees (None, AtLeastOnce, AtMostOnce, ExactlyOnce) for this
binding.  This value is only relevant if sessions are enabled (via the
ReliableSessionEnabled bool).  The default value is
TransferAssurances.ExactlyOnce.

public TimeSpan SessionConnectTimeout

The SessionConnectTimeout property allows you to get or set the maximum
amount of time that a session connect operation may take.  The default
value is 30 seconds.

public TimeSpan SessionInactivityTimeout

The SessionInactivityTimeout property allows you to get or set the maximum
amount of time a session may be idle before it is terminated.  The default
value is 5 minutes.

public EnvelopeVersion SoapVersion

The SoapVersion property allows you to get othe SOAP version to be used for
messages processed by this binding.  The NetProfileTcpBinding only supports
SOAP 1.2.

public bool TcpPortSharingEnabled

The TcpPortSharingEnabled property allows you to get or set with the Tcp
Ports should be shared using the Indigo Listener.  The default value is
false, implying that each binding will exclusively use the TCP port.  Note
that this value is only relevant to services (and not to clients).

public ProtectionLevel TcpProtectionLevel

The TcpProtectionLevel property allows you to get or set the message
protection level to be used with TCP-based security.  This property is only
used if the SecurityModeProp-erty is set to either TcpWithSsl or
TcpWithWindowsSecurity.  The default value is
Pro-tectionLevel.EncryptAndSign.

public TransferMode TransferMode

The TransferMode property allows you to configure the type of message
transfer (Buff-ered or Streaming) that is used.  The default value is
Buffered.  If Streaming is selected, ReliableSessionEnabled must be false
and SecurityMode must either be None, TcpWithSSl, or TcpWithWindowSecurity.

public TimeSpan TransferTimeout

The TransferTimeout property allows you to get or set the maximum amount of
time a message transfer may take.  The default value is 10 minutes.

public WSSecurityOverTcp WSSecurity

The WSSecurity property allows you to get a WSSecurityOverTcp object, which
allows configuration of the security behavior of the binding.  This
property is only used if the SecurityMode property is set to
NetProfileSecurityMode.WSSecurityOverTcp.

------------------------------------------------------------------

System.ServiceModel.NetProfileTcpSecurityMode

The NetProfileTcpSecurityMode enum allows you to configure the type of
security that should be used with the NetProfileTcpBinding.

public enum NetProfileTcpSecurityMode
{
    None,
    TcpWithWindowsSecurity,
    TcpWithSsl,
    WSSecurityOverTcp
}

None

The None value indicates that security should be disabled.

TcpWithWindowSecurity

The TcpWithWindowsSecurity value indicates that Windows Security should be
used.  This provides message integrity, confidentiality, and mutual
authentication.

TcpWithSsl

The TcpWithSsl value indicates that TCP with SSL-based security should be
used.  This provides message integrity, confidentiality, and server
authentication.  This does not provide client authentication.

WSSecurityOverTcp

The WSSecurityOverTcp value indicates that WS-Security should be used over
TCP.  WS-Security will be used for message integrity, confidentiality, and
authentication.  The WSSecurity mechanism can be refined via the
WSSecurityOverTcp type.

------------------------------------------------------------------

System.ServiceModel.WSProfileBinding

The WSProfileBinding is a secure, reliable, interoperable binding suitable
for non-duplex ServiceContracts.  By default it will generate a runtime
stack which uses WS-ReliableMessaging for reliability, WS-Security for
message security and authentication, HTTP for message delivery, and a
Text/XML message encoding.  The security behavior is configurable via the
optional securityMode parameter.  The use of WS-ReliableMessaging is
configurable via the optional enableReliableSession parameter.

public class WSProfileBinding : Binding
{
    public WSProfileBinding() { }
    public WSProfileBinding(WSProfileSecurityMode securityMode) { }
    public WSProfileBinding(WSProfileSecurityMode securityMode, bool
enableReliableSession) { }

    public ContextFlowOption FlowTransactions { get; set; }
    public HostnameComparisonMode HostnameComparisonMode { get; set; }
    public HttpAuthentication HttpAuthentication { get; }
    public long MaxMessageSize { get; set; }
    public WSMessageEncoding MessageEncoding { get; set; }
    public bool OrderedSession { get; set; }
    public Uri ProxyAddress { get; set; }
    public bool ReliableSessionEnabled { get; set; }
    public WSProfileSecurityMode SecurityMode { get; set; }
    public TransferAssurances SessionAssurances { get; set; }
    public TimeSpan SessionConnectTimeout { get; set; }
    public TimeSpan SessionInactivityTimeout { get; set; }
    public EnvelopeVersion SoapVersion { get; set; }
    public System.Text.Encoding TextEncoding { get; set; }
    public TimeSpan TransferTimeout { get; set; }
    public bool UseSystemWebProxy { get; set; }
    public WSSecurityOverHttp WSSecurity { get; }
}

public WSProfileBinding()

Instantiates a new instance of the WSProfileBinding.  By default,
WS-Security will be used (SecurityMode will be WSSecurityOverHttp) and
reliable sessions will be disabled (EnableReliableSession will be false).

public WSProfileBinding(WSProfileSecurityMode securityMode)

Instantiates a new instance of the WSProfileBinding with the specified
securityMode.  By default, reliable sessions will be disabled
(EnableReliableSession will be false).

public WSProfileBinding(WSProfileSecurityMode securityMode, bool
enableReliableSession)

Instantiates a new instance of the WSProfileBinding with the specified
securityMode and enableReliableSession values.

public ContextFlowOption FlowTransactions

The FlowTransactions property allows you to get or set whether this binding
should sup-port flowing WS-Transactions.  The default value is
ContextFlowOption.NotAllowed, indicating that clients will not flow
transactions, and services will reject messages with a flowed transaction
message header.

public HostnameComparisonMode HostnameComparisonMode

The HostnameComparisonMode property allows you to get or set whether a
binding in-stance should be reachable via any valid machine name, or only
the endpoint's config-ured hostname.  The default value is StrongWildcard.

public HttpAuthentication HttpAuthentication

The HttpAuthentication property allows you to get or set an object that
allows configura-tion of HTTP Authenticaiton options.  This property is
used only if you use WSProfile-SecurityMode.HttpAuthenticationOverHttps,
otherwise its value is ignored.

public long MaxMessageSize

The MaxMessageSize property allows you to get or set the maximum size for
messages processed by a binding instance.  The default value is 65,536
bytes (64k).

public WSMessageEncoding MessageEncoding

The MessageEncoding property allows you to get or set the message encoding
to be used for messages processed by this binding.  The default value is
WSMessageEncoding.Text.

public bool OrderedSession

The OrderedSession property allows you to get or set whether this binding
should guar-antee in-order delivery of messages.  This value is only
relevant if sessions are enabled (via the ReliableSessionEnabled property).
 The default value is true.

public Uri ProxyAddress

The ProxyAddress property allows you to get or set the address of your HTTP
Proxy.  The default value is null.  It is an error for this to be non-null
and UseSystemWebProxy to be true.

public bool ReliableSessionEnabled

The ReliableSessionEnabled property allows you get or set whether
WS-ReliableMessaging should be used to create sessionful channels.  The
default value is false, indicating that this binding will not support
sessionful channels.

public WSProfileSecurityMode SecurityMode

The SecurityMode property allows you to get or set the type of security to
be used with this binding.  The default value is
WSProfileSecurityMode.WSSecurityOverHttp. 

public TransferAssurances SessionAssurances

The SessionAssurances property allows you to get or set the message
delivery guarantees (None, AtLeastOnce, AtMostOnce, ExactlyOnce) for this
binding.  This value is only relevant if sessions are enabled (via the
ReliableSessionEnabled bool).  The default value is
TransferAssurances.ExactlyOnce.

public TimeSpan SessionConnectTimeout

The SessionConnectTimeout property allows you to get or set the maximum
amount of time that a session connect operation may take.  The default
value is 30 seconds.

public TimeSpan SessionInactivityTimeout

The SessionInactivityTimeout property allows you to get or set the maximum
amount of time a session may be idle before it is terminated.  The default
value is 5 minutes.

public EnvelopeVersion SoapVersion

The SoapVersion property allows you to get or set the SOAP version (either
SOAP 1.1 or SOAP 1.2) to be used for messages processed by this binding. 
The default value is SOAP 1.2.

public System.Text.Encoding TextEncoding

The TextEncoding property allows you to get or set the Character Set
Encoding to be used for messages emitted from this binding.  The default
value is an instance of the Sys-tem.Text.UTF8Encoding class.

public TimeSpan TransferTimeout

The TransferTimeout property allows you to get or set the maximum amount of
time a message transfer may take.  The default value is 10 minutes.

public bool UseSystemWebProxy

The UseSystemWebProxy property allows you to get or set whether the
system's auto-configured HTTP proxy should be used, if available.  The
default value is true.  It is an error for this to be true and ProxyAddress
to be non-null.

public WSSecurityOverHttp WSSecurity

The WSSecurity property allows you to get a WSSecurityOverHttp object,
which allows configuration of the security behavior of the binding.  This
property is only used if the SecurityMode property is set to
WSProfileSecurityMode.WSSecurityOverHttp.

------------------------------------------------------------------

System.ServiceModel.WSProfileSecurityMode

The WSProfileSecurityMode enum allows you to configure the type of security
that should be used with the WSProfileBinding.

public enum WSProfileSecurityMode
{
    None,
    Https,
    HttpsWithClientCertificate,
    HttpAuthenticationOverHttps,
    WSSecurityOverHttp
}

None

The None value indicates that security should be disabled.

Https

The Https value indicates that HTTPS security should be used.  This
provides message integrity, confidentiality, and server authentication. 
This does not provide client authen-tication.

HttpsWithClientCertificate

The HttpsWithClientCertificate value indicates that HTTPS security should
be used with a client X.509 certificate.  This provides message integrity,
confidentiality, and mutual authentication.

HttpAuthenticationOverHttps

The HttpAuthenticationOverHttps value indicates that HTTPS security should
be used with HTTP authentication.  This provides message integrity,
confidentiality, and server authentication.  The HTTP authentication
mechanism can be refined via the HttpAuthen-tication type.

WSSecurityOverHttp

The WSSecurityOverHttp value indicates that WS-Security should be used over
HTTP.  WS-Security will be used for message integrity, confidentiality, and
authentication.  The WSSecurity mechanism can be refined via the
WSSecurityOverHttp type.


[bindings]
 [customBinding]

  [!-- The BasicProfileBinding, which is an HTTP-based
       binding compatible with the WS-I Basic Profile --]

   [binding configurationName="BasicProfileBinding"]
     [httpTransport hostnameComparisonMode="StrongWildcard"
                    manualAddressing="False"
                    maxMessageSize="65536"
                    authenticationScheme="Anonymous"
                    bypassProxyOnLocal="False"
                    mapAddressingHeadersToHttpHeaders="True"
                    realm=""
                    transferTimeout="00:10:00"
                    useSystemWebProxy="True" /]
     [textMessageEncoding maxReadPoolSize="64"
                          maxWritePoolSize="16"
                          messageVersion="Soap11Addressing1"
                          encoding="utf-8" /]
   [/binding]

[!-- The WsProfileBinding, which can interop with
     anyone who speaks the WS-* protocols. It uses
     WS-Security at the SOAP layer to provide
     end-to-end security across intermediaries --]


   [binding configurationName="WsProfileBinding"]
    [security algorithmSuite="Default"
              authenticationMode="SspiNegotiated"
              contextMode="Session"
              defaultProtectionLevel="EncryptAndSign"
              enableKeyDerivation="True"
              includeTimestamp="True"
              messageProtectionOrder="SignBeforeEncrypt"
              securityVersion="WSSecurityXXX2005" /]
    [httpTransport hostnameComparisonMode="StrongWildcard"
                   manualAddressing="False"
                   maxMessageSize="65536"
                   authenticationScheme="Anonymous"
                   bypassProxyOnLocal="False"
                   mapAddressingHeadersToHttpHeaders="False"
                   realm=""
                   transferTimeout="00:10:00"
                   useSystemWebProxy="True" /]
   [textMessageEncoding maxReadPoolSize="64"
                        maxWritePoolSize="16"
                        messageVersion="Default"
                        encoding="utf-8" /]
   [/binding]
 

[!-- The WsProfileDualHttpBinding, which layers a Reliable Messaging
     session on top of two HTTP channels, which lets you do duplex
     communication over HTTP. It's also secure by default. --]

   [binding configurationName="WsProfileDualHttpBinding"]
    [reliableSession acknowledgementInterval="00:00:00.2000000"
                    advancedFlowControl="True"
                    bufferedMessagesQuota="32"
                    inactivityTimeout="00:10:00"
                    maxPendingChannels="128"
                    maxRetryCount="8"
                    ordered="True" /]
    [security algorithmSuite="Default"
             authenticationMode="SspiNegotiated"
             contextMode="Session"
             defaultProtectionLevel="EncryptAndSign"
             enableKeyDerivation="True"
             includeTimestamp="True"
             messageProtectionOrder="SignBeforeEncrypt"
             securityVersion="WSSecurityXXX2005" /]
    [compositeDuplex /]
    [httpTransport hostnameComparisonMode="StrongWildcard"
                  manualAddressing="False"
                  maxMessageSize="65536"
                  authenticationScheme="Anonymous"
                  bypassProxyOnLocal="False"
                  mapAddressingHeadersToHttpHeaders="False"
                  realm=""
                  transferTimeout="00:10:00"
                  useSystemWebProxy="True" /]
    [textMessageEncoding maxReadPoolSize="64"
                        maxWritePoolSize="16"
                        messageVersion="Default"
                        encoding="utf-8" /]
   [/binding]
 

[!-- The NetProfileTcpBinding, which is an Indigo/Indigo binding. --]

   [binding configurationName="NetProfileTcpBinding"]
     [tcpTransport hostnameComparisonMode="StrongWildcard"
                 manualAddressing="False"
                 maxMessageSize="65536"
                 closeTimeout="00:00:01"
                 connectionBufferSize="65536"
                 connectionPoolGroupName="default"
                 maxBufferSize="65536"
                 maxInboundConnections="10"
                 maxOutputDelay="00:00:00.2000000"
                 maxPendingAccepts="1"
                 protectionLevel="EncryptAndSign"
                 transferMode="Buffered"
                 transferTimeout="00:10:00"
                 useIndigoListener="False"
                 IPv6ProtectionLevel="Default"
                 isKeepAliveEnabled="False"
                 listenBacklog="10"
                 securityMode="None" /]
     [binaryMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" /]
   [/binding]

   [!-- The NetProfileDualTcpBinding, which is another Indigo/Indigo binding. --]

   [binding configurationName="NetProfileDualTcpBinding"]
     [reliableSession acknowledgementInterval="00:00:00.2000000"
                    advancedFlowControl="True"
                    bufferedMessagesQuota="32"
                    inactivityTimeout="00:10:00"
                    maxPendingChannels="128"
                    maxRetryCount="8" ordered="True" /]
     [security algorithmSuite="Default"
             authenticationMode="SspiNegotiated"
             contextMode="Session"
             defaultProtectionLevel="EncryptAndSign"
             enableKeyDerivation="True"
             includeTimestamp="True"
             messageProtectionOrder="SignBeforeEncrypt"
             securityVersion="WSSecurityXXX2005" /]
     [compositeDuplex /]
     [tcpTransport hostnameComparisonMode="StrongWildcard"
                 manualAddressing="False"
                 maxMessageSize="65536"
                 closeTimeout="00:00:01"
                 connectionBufferSize="65536"
                 connectionPoolGroupName="default"
                 maxBufferSize="65536"
                 maxInboundConnections="10"
                 maxOutputDelay="00:00:00.2000000"
                 maxPendingAccepts="1"
                 protectionLevel="EncryptAndSign"
                 transferMode="Buffered"
                 transferTimeout="00:10:00"
                 useIndigoListener="False"
                 IPv6ProtectionLevel="Default"
                 isKeepAliveEnabled="False"
                 listenBacklog="10"
                 securityMode="None" /]
    [binaryMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" /]
   [/binding]

   [!-- The NetProfileNamedPipesBinding, which is an Indigo/Indigo binding
        for on-machine communication. --]

   [binding configurationName="NetProfileNamedPipesBinding"]
     [namedPipeTransport hostnameComparisonMode="StrongWildcard"
                      manualAddressing="False"
                      maxMessageSize="65536"
                      closeTimeout="00:00:01"
                      connectionBufferSize="65536"
                      connectionPoolGroupName="default"
                      maxBufferSize="65536"
                      maxInboundConnections="10"
                      maxOutputDelay="00:00:00.2000000"
                      maxPendingAccepts="1"
                      protectionLevel="EncryptAndSign"
                      transferMode="Buffered"
                      transferTimeout="00:10:00"
                      useIndigoListener="False"
                      connectTimeout="00:00:02"
                      securityMode="Windows" /]
     [binaryMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" /]
  [/binding]
[/customBinding]

 

Friday, April 01, 2005 10:25:10 PM (Malay Peninsula Standard Time, UTC+08:00)  #    Disclaimer  Comments [0]