How to: Configure a Channel Programmatically
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

How to: Configure a Channel Programmatically 

This code example shows how to configure a channel programmatically for a server application domain. In this case, the server is specifying that the remoting system should use a HttpChannel object for transportation, but use a BinaryFormatter object for serialization and deserialization.


Dim props = New Hashtable() As IDictionary
props("name") = "ChannelName1" 
Dim channel As New HttpChannel( _
   props, _
   Nothing, _
   New BinaryServerFormatterSinkProvider() _
IDictionary props = new Hashtable();
props["name"] = "MyHttpChannel";
HttpChannel channel = new HttpChannel(
   new BinaryServerFormatterSinkProvider()

See Also

© 2016 Microsoft