private void ServerStartupRemoting() { SoapClientFormatterSinkProvider clientSinkProvider = new SoapClientFormatterSinkProvider(); IDictionary props = new Hashtable(); props["typeFilterLevel"] = "Full"; SoapServerFormatterSinkProvider serverSinkProvider = new SoapServerFormatterSinkProvider(props, null); ClientIpServerSinkProvider clientIpSinkProvider = new ClientIpServerSinkProvider(props, null); serverSinkProvider.Next = clientIpSinkProvider; props["port"] = ServerPort; props["name"] = "ServerChannel"; HttpChannel chan = new HttpChannel(props, clientSinkProvider, serverSinkProvider); string name = chan.ChannelName; ChannelServices.RegisterChannel(chan, false); if (System.IO.File.Exists(configFile)) { RemotingConfiguration.Configure(configFile, false); } else { MessageBox.Show("Missing config file:\r\n" + configFile); } RemotingConfiguration.RegisterWellKnownServiceType( typeof(Allberg.Shooter.WinShooterServer.ClientInterface), "WinShooterServer", WellKnownObjectMode.Singleton); }
private void ServerStartupRemoting() { SoapClientFormatterSinkProvider clientSinkProvider = new SoapClientFormatterSinkProvider(); IDictionary props = new Hashtable(); props["typeFilterLevel"] = "Full"; SoapServerFormatterSinkProvider serverSinkProvider = new SoapServerFormatterSinkProvider(props, null); ClientIpServerSinkProvider clientIpSinkProvider = new ClientIpServerSinkProvider(props, null); serverSinkProvider.Next = clientIpSinkProvider; props["port"] = ServerPort; props["name"] = "ServerChannel"; HttpChannel chan = new HttpChannel(props, clientSinkProvider, serverSinkProvider); string name = chan.ChannelName; ChannelServices.RegisterChannel(chan, false); if (System.IO.File.Exists(configFile)) RemotingConfiguration.Configure(configFile, false); else MessageBox.Show("Missing config file:\r\n" + configFile); RemotingConfiguration.RegisterWellKnownServiceType( typeof(Allberg.Shooter.WinShooterServer.ClientInterface), "WinShooterServer", WellKnownObjectMode.Singleton); }