SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
ComNetInterface.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
4 using System.Text;
5 using System.Runtime.Remoting;
6 using System.Runtime.Remoting.Channels;
7 using System.Runtime.Remoting.Channels.Tcp;
8 using System.Runtime.Remoting.Channels.Http;
9 using System.Runtime.InteropServices;
10 
11 namespace Seci.Remoting
12 {
26  [GuidAttribute("D5DD2558-7C71-3462-8323-68C2DE67C86D"), ComVisible(true)]
27  [ProgId("Seci.Remoting.ComNetInterface")]
28  public class ComNetInterface
29  {
31  public Remoting.ReadWriteRemoting Client { get { return _client; } }
32 
36  public ComNetInterface()
37  {
38  //Setup the configuration parameters through a dictionary
39  IDictionary properties = new Hashtable();
40  properties.Add("secure", true);
41  properties.Add("connectionTimeout", 5000);
42  properties.Add("tokenimpersonationlevel", "impersonation");
43 
44  //Create a channel for communicating w/ the remote object
45  TcpClientChannel clientChannel = new TcpClientChannel(properties, null);
46  ChannelServices.RegisterChannel(clientChannel, true);
47 
48  _client = (Seci.Remoting.ReadWriteRemoting)Activator.GetObject(typeof(Seci.Remoting.ReadWriteRemoting), "tcp://localhost:8084/SECISecure.rem");
49  }
50  }
51 }
This class is for accessing SECI via DotNet Remoting. This class can return values from SECI and also...
static Remoting.ReadWriteRemoting _client