public void Main() { channel = new HttpChannel(3344); ChannelServices.RegisterChannel(channel); RemotingConfiguration.RegisterWellKnownServiceType (typeof(Bug321420), "Server.soap", WellKnownObjectMode.Singleton); Bug321420 s = (Bug321420)Activator.GetObject(typeof (Bug321420), "http://localhost:3344/Server.soap"); // this works: s.Method ("a", "b"); s.Method("a", "a"); }
public void Main() { var port = NetworkHelpers.FindFreePort(); channel = new HttpChannel(port); ChannelServices.RegisterChannel(channel); RemotingConfiguration.RegisterWellKnownServiceType (typeof(Bug321420), "Server.soap", WellKnownObjectMode.Singleton); Bug321420 s = (Bug321420)Activator.GetObject(typeof (Bug321420), $"http://localhost:{port}/Server.soap"); // this works: s.Method ("a", "b"); s.Method("a", "a"); }
public void Main() { var port = NetworkHelpers.FindFreePort(); Hashtable props = new Hashtable(); props["port"] = port; props["bindTo"] = "127.0.0.1"; channel = new HttpChannel(props, null, null); ChannelServices.RegisterChannel(channel); RemotingConfiguration.RegisterWellKnownServiceType (typeof(Bug321420), "Server.soap", WellKnownObjectMode.Singleton); Bug321420 s = (Bug321420)Activator.GetObject(typeof (Bug321420), $"http://127.0.0.1:{port}/Server.soap"); // this works: s.Method ("a", "b"); s.Method("a", "a"); }