remoting connection with http channel with binary formatter
-
hi my senario is i have one desktop application and one remote service for server now if i want to connect then i m using http channel with binary formatter now my problem is by using my code i can open one instance at a time for other it will give me error saying only port is normally allowed.... i want to run mutliple exe or instance from same machine which will utilize remote services on server please help me ,, below is my code.
IDictionary props = new Hashtable();
props["port"] = TechnicalSettings.RemotingServerPort;
props.Add("typeFilterLevel", TypeFilterLevel.Full);
//props.Add("timeout", 2000);
BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
channel = new HttpChannel(props, clientProvider, null);
ChannelServices.RegisterChannel(channel, false);//TcpChannel channel = new TcpChannel(); //ChannelServices.RegisterChannel(channel, true); var server = string.Format("http://{0}:{1}/RemoteOperation", TechnicalSettings.RemotingServer, TechnicalSettings.RemotingServerPort); \_remoteOperation = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), server); \_exist = \_remoteOperation.TestRemoting();
Reasons are not Important but Results are Important. http://www.sql4professional.blogspot.com Swati Tripathi
-
hi my senario is i have one desktop application and one remote service for server now if i want to connect then i m using http channel with binary formatter now my problem is by using my code i can open one instance at a time for other it will give me error saying only port is normally allowed.... i want to run mutliple exe or instance from same machine which will utilize remote services on server please help me ,, below is my code.
IDictionary props = new Hashtable();
props["port"] = TechnicalSettings.RemotingServerPort;
props.Add("typeFilterLevel", TypeFilterLevel.Full);
//props.Add("timeout", 2000);
BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
channel = new HttpChannel(props, clientProvider, null);
ChannelServices.RegisterChannel(channel, false);//TcpChannel channel = new TcpChannel(); //ChannelServices.RegisterChannel(channel, true); var server = string.Format("http://{0}:{1}/RemoteOperation", TechnicalSettings.RemotingServer, TechnicalSettings.RemotingServerPort); \_remoteOperation = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), server); \_exist = \_remoteOperation.TestRemoting();
Reasons are not Important but Results are Important. http://www.sql4professional.blogspot.com Swati Tripathi
There will be channel setting on remote server as say eg:
<channels>
<channel ref="http" port="1234">
<serverProviders>
<formatter ref="binary" />
</serverProviders>
</channel>
</channels>You can specify multiple channels with different port and create/call different instances of required exposed port.
// ♫ 99 little bugs in the code, // 99 bugs in the code // We fix a bug, compile it again // 101 little bugs in the code ♫
-
There will be channel setting on remote server as say eg:
<channels>
<channel ref="http" port="1234">
<serverProviders>
<formatter ref="binary" />
</serverProviders>
</channel>
</channels>You can specify multiple channels with different port and create/call different instances of required exposed port.
// ♫ 99 little bugs in the code, // 99 bugs in the code // We fix a bug, compile it again // 101 little bugs in the code ♫
thanks for your reply. can u pls give me any help link for such senario. because my senario is i have one server i ll install my remote service and window application over der now my client(desktop application) will connect to server using one port i.e. 1069 now i want to give mulitple access (RDP) to say 5-10 users now they all will login and will run the same exe but i think its not possible i m not sure about it wil u pls give ur glance to such senario and let me know wht can be possible in my senario y we want to put remote service and desktop application on same machine and then give to rdp because when users are connect from theri own machine then system is not responding as quick as we have too.
Reasons are not Important but Results are Important. http://www.sql4professional.blogspot.com Swati Tripathi