Beispiel #1
0
        // Initialise the remoting connection with http channel with binary formatter
        public bool RemotingConnection()
        {
            if (!_exist)
            {
                //IDictionary props = new Hashtable();
                //props["port"] = 0;
                //props.Add("typeFilterLevel", TypeFilterLevel.Full);
                //BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
                //HttpChannel channel = new HttpChannel(props, clientProvider, null);
                //ChannelServices.RegisterChannel(channel, false);

                var server = string.Format("http://{0}:{1}/RemoteCoreDomain", TechnicalSettings.RemotingServer, TechnicalSettings.RemotingServerPort);

                _remoteOperation = (ICoreDomainRemoting)Activator.GetObject(typeof(ICoreDomainRemoting), server);
                _exist           = true;
            }
            return(true);
        }
Beispiel #2
0
        // Initialise the remoting connection with http channel with binary formatter
        public bool RemotingConnection()
        {
            if (!_exist)
            {
                //IDictionary props = new Hashtable();
                //props["port"] = 0;
                //props.Add("typeFilterLevel", TypeFilterLevel.Full);
                //BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
                //HttpChannel channel = new HttpChannel(props, clientProvider, null);
                //ChannelServices.RegisterChannel(channel, false);

                var server = string.Format("http://{0}:{1}/RemoteCoreDomain", TechnicalSettings.RemotingServer, TechnicalSettings.RemotingServerPort);

                _remoteOperation = (ICoreDomainRemoting)Activator.GetObject(typeof(ICoreDomainRemoting), server);
                _exist = true;
            }
            return true;
        }