We help IT Professionals succeed at work.

Connecting to a .net remoting server over lan

gustierng
gustierng asked
on
Medium Priority
435 Views
Last Modified: 2012-05-06
Hi

I am connecting to a .net remoting server over a LAN to retrieve data.  When it is not being updated with high frequency real-time data, I can retrieve the data I need.

However, when it is being updated with real-time data I get the following error:

No connection could be made because the target machine actively refused it.

Any ideas how to get the data?  The data retrieval should be given priority over the updates.

Thanks
Comment
Watch Question

Plese give me more info:
- Protocoll use
- server type
- detailed error message
- server log file message

can you debug the server ?

are you closing all conection properly?

Author

Commented:
tcp
WellKnownObjectMode.Singleton

I think i need a channel / port for each user connecting and one for the real-time updates.

Any guidance here would be helpful...
i have an server with one thread listening for new conections, after an connection arrived the it starts a new thread for the new connection.

is the server written by you?

is a server log file present ?

Author

Commented:
do you have any examples of what you are discussing?

The server has been adapted from some code written by others.

there are no log files as such.  The logs are available but not persisted.

Author

Commented:
how do I keep a connection open for all users so that listens for new connections?

so that it does not lock out other users?

      int PortNumber = 10000;
      TcpListener MyListener = new TcpListener(PortNumber);
 
      MyListener.Start();
      
      while(myAppIsUP){
         TcpClient MyClient = MyListener.AcceptTcpClient();
         NetworkStream MyNetStream = MyClient.GetStream();
         // star new thread and pass instance of "MyNetStream"
      }   
      MyListener.Stop();
 
///////////////////////////
on the Client Thread
  call MyClient.Close(); when finished

Open in new window

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
So you suggest I use System.Net to maintain a shared port rather than .net remoting?
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.