 | How to register a chanel |
| //// formatter setting
| | 1: BinaryServerFormatterSinkProvider objServerFormat = new BinaryServerFormatterSinkProvider();
| | 2: objServerFormat.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
| | 3:
| | 4: BinaryClientFormatterSinkProvider objClientFormat = new BinaryClientFormatterSinkProvider();
| | 5:
| | 6: //// port setting
| | 7: System.Collections.IDictionary _props = new System.Collections.Hashtable();
| | 8: _props["port"] = 8002;
| | 9:
| | 10: //// Chanel creation
| | 11: HttpChannel chan = new HttpChannel(_props, objClientFormat, objServerFormat);
| | 12: ChannelServices.RegisterChannel(chan);
| | 13: |
|