Print Channels List for Current Configuration RRS feed

  • Question

  • Hi Guys,

    I am interested in finding out how the message travels through different channels in the channel stack before it goes to the wire.

    I am trying to find out a way to print the list of channels in a channel stack for a particular configuration that have set in my configuration file.

    Example: Let's say I want to find the list of channels through which my message passes through for the following configuration:

    <endpoint address="CustomerServiceAdvanced" binding="ws2007HttpBinding"
                        name="CustomerServiceAdvanced" contract="MyWCFServicesSamples.MyWCFServicesLibrary.ICustomerService"

    Can you please tell me if there is any API that can use to get these details?

    Sunday, January 18, 2009 7:11 PM


  • Hi,

     You can create a System.ServiceModel.Channels.CustomBinding instance (one of the constructors takes a Binding as the input - hence you can input the binding you have configured). The CustomBinding.Elements gives you access to the channels (or more specific, the BindingElements - that is used to create the channels) that the binding is made up of.


    Lars Wilhelmsen | Senior Consultant | Miles, Norway | Connected Systems MVP | http://larswilhelmsen.com/
    Sunday, January 18, 2009 7:17 PM