none
Equivalent customBinding for the given netTcpBinding via configuration file only RRS feed

  • Question

  • Hi,

    I have the following netTcpBinding

                <netTcpBinding>
                    <binding name="netTcpBindingConfig">
                        <security mode="Transport">
                            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                            <message clientCredentialType="UserName" />
                        </security>
                    </binding>
                </netTcpBinding>

    I need to know how I can replicate it using customBinding

    currently the below does not work, as 'mode' is unknown attribute.

    <customBinding>
        <binding name="CustomNetTcpBindingConfig">     
               <security mode="Transport">
                    <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                    <message clientCredentialType="UserName" />
               </security>
         <tcpTransport channelInitializationTimeout="00:01:00"></tcpTransport>
        </binding>
    </customBinding>

    Basically, only with customBinding I can utilise channelInitializationTimeout attribute, which is not available in the default netTcpBinding.

    But I also need the current security model that we have implemented, so what would be the like to like equivalent customBinding for the above given netTcpBinding please?

    Any help is sincerely appreciated.

    Many thanks for all your help.

    Wednesday, May 8, 2013 1:14 PM

Answers

  • Hi,

    Refer an example blow and check an example on how to configure security by using a custom binding, the service configuration defines a custom binding that supports TCP communication protected by using the TLS/SSL protocol and Windows message security. But I afraid you cannot custom one exactly like you provided above.

    #NetTcpBinding to CustomBinding conversion - sample

    http://plainoldstan.blogspot.com/2007/09/nettcpbinding-to-custombinding.html

    #Custom Binding Security

    http://msdn.microsoft.com/en-us/library/ms751528.aspx

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 9, 2013 7:34 AM
    Moderator
  • Okay, finally I got it working as below.

    For the below netTcpBinding

    <netTcpBinding>
                    <binding name="netTcpBindingConfig">
                        <security mode="Transport">
                            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                        </security>
                    </binding>
    </netTcpBinding>

    the correct customBinding seems to be as given below:

    <customBinding>
    <binding name="CustomNetTcpBindingConfig">
         <windowsStreamSecurity />
         <tcpTransport />
        </binding>
    </customBinding>

    Wednesday, May 15, 2013 10:11 AM

All replies

  • Hi,

    Refer an example blow and check an example on how to configure security by using a custom binding, the service configuration defines a custom binding that supports TCP communication protected by using the TLS/SSL protocol and Windows message security. But I afraid you cannot custom one exactly like you provided above.

    #NetTcpBinding to CustomBinding conversion - sample

    http://plainoldstan.blogspot.com/2007/09/nettcpbinding-to-custombinding.html

    #Custom Binding Security

    http://msdn.microsoft.com/en-us/library/ms751528.aspx

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 9, 2013 7:34 AM
    Moderator
  • Hi Haixia,

    Thanks for the details, as such I've already checked those urls before.

    But I did not find a straight forward settings that would suit what we currently have implemented for security.

    Looks like I have play with few settings to see what would work as an exact replacement in customBinding for my current netTcpBinding.

    Thanks,

    Friday, May 10, 2013 9:57 AM
  • Okay, finally I got it working as below.

    For the below netTcpBinding

    <netTcpBinding>
                    <binding name="netTcpBindingConfig">
                        <security mode="Transport">
                            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                        </security>
                    </binding>
    </netTcpBinding>

    the correct customBinding seems to be as given below:

    <customBinding>
    <binding name="CustomNetTcpBindingConfig">
         <windowsStreamSecurity />
         <tcpTransport />
        </binding>
    </customBinding>

    Wednesday, May 15, 2013 10:11 AM