473,327 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

.net Remoting Exception

Hi EveryBody,

I am developing .net remoting application.I have Created server and client application. Server has installed on Two Pc's and cliient have to connect two Pc's and do some functions.

Its working Fine on local machine . But when i tried to connect two PC's, its through an remoting exception

This is my server code:

Dictionary<string, object> props = new Dictionary<string, object>();
props["typeFilterLevel"] = "Full";
BinaryServerFormatterSinkProvider provider = new BinaryServerFormatterSinkProvider(props, null);
props["secure"] = true;
props["port"] = 60800;
TcpChannel tcpchan = new TcpChannel(props, null, provider);
ChannelServices.RegisterChannel(tcpchan, true);

RemotingConfiguration.CustomErrorsMode = CustomErrorsModes.Off;
//TcpChannel remoteChannel = new TcpChannel(60800);
//ChannelServices.RegisterChannel(remoteChannel,true );
RemotingConfiguration.RegisterWellKnownServiceType (typeof(Remote.cls_SMSList), "cls_SMSList", WellKnownObjectMode.Singleton);

This is my Client Code:

Dictionary<string, object> props = new Dictionary<string, object>();
props["secure"] = true;
props["domain"] = dsPcDetails.Tables[0].Rows[0]["Dname"].ToString();
props["username"] = dsPcDetails.Tables[0].Rows[0]["Username"].ToString();
props["password"] = dsPcDetails.Tables[0].Rows[0]["Password"].ToString();
props["port"] = 0;
Channel = new TcpChannel(props, null, null);
ChannelServices.RegisterChannel(Channel, true);
PcnameList.Add(dsPcDetails.Tables[0].Rows[0]["PCName"].ToString());

ObjSMS = (Remote.cls_SMSList)Activator.GetObject(typeof(Rem ote.cls_SMSList), "tcp://" + IPadd + "/cls_SMSList");




A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Server stack trace:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Runtime.Remoting.Channels.RemoteConnection. CreateNewSocket(EndPoint ipEndPoint)
at System.Runtime.Remoting.Channels.RemoteConnection. CreateNewSocket()
at System.Runtime.Remoting.Channels.SocketCache.GetSo cket(String machinePortAndSid, Boolean openNew)
at System.Runtime.Remoting.Channels.Tcp.TcpClientTran sportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
at System.Runtime.Remoting.Channels.Tcp.TcpClientTran sportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientForma tterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData& msgData, Int32 type)
at Remote.cls_SMSList.CreateSMSList(List`1 ComPort)
at cls_QueueList.LoadMobiles()


Any help Would be appriciated.
Feb 23 '09 #1
0 1518

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Sean Newton | last post by:
I am absolutely bewildered by now by the Microsoft.Samples SSPI and Security assemblies. I've been trying to set these up in a very straightforward harness in the way that I'd like to be able to...
0
by: Mike Grishaber | last post by:
Hello All, I am using an IHttpAsyncHandler class to intercept HTTP Requests and forward them to a system which processes the Request and returns the Result. I use .NET Remoting to connect the...
15
by: Sharon | last post by:
I’m trying to build a generic Publisher-Subscriber that will work over the net, so I’m using the Remoting. I wish that the subscriber user will be notify about the messages sent by the...
4
by: Uchiha Jax | last post by:
Hello everyone, I am a plenty silly person who is trying to learn .NET remoting through trial and error (all articles I read are going over my head at the moment (mostly) so I thought i'd give...
1
by: David Krmpotic | last post by:
Hi All! I have a .NET remoting Client-Server application with Server Activated Objects only.. something is worrying me.. sometimes (rarely), I can't connect to the server although it is...
0
by: Martijn Damen | last post by:
Hi, At the moment I am trying to develop an application that uses another app over .net remoting and having some problems with it (ok, that is ofcourse why I am here), hope somebody can shine a...
4
by: Sharon | last post by:
Hi, I'm using the remoting, and I have a remoting object that has a public event that other processes should register to it. But when the client process is registering to the remote event, it...
3
by: Mike9900 | last post by:
We need to get the correct error message from the .NET Remoting server on the another computer. When we use .NET Remoting the client does not receive correct SQL Server error message if the...
0
by: Kristian Reukauff | last post by:
Hi I have a problem with the .Net-Securty-Functions. I've got a client and a server. When I try to register a channel at the server with this line: ChannelServices.RegisterChannel(chan, false);...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.