?
Solved

Connecting to a .net remoting server over lan

Posted on 2009-02-18
7
Medium Priority
?
417 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
0
Comment
Question by:gustierng
  • 4
  • 3
7 Comments
 
LVL 14

Expert Comment

by:Daniel Junges
ID: 23679848
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?
0
 

Author Comment

by:gustierng
ID: 23680027
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...
0
 
LVL 14

Expert Comment

by:Daniel Junges
ID: 23681214
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 ?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:gustierng
ID: 23681913
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.
0
 

Author Comment

by:gustierng
ID: 23683922
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?
0
 
LVL 14

Accepted Solution

by:
Daniel Junges earned 1500 total points
ID: 23684168

      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

0
 

Author Comment

by:gustierng
ID: 23720614
So you suggest I use System.Net to maintain a shared port rather than .net remoting?
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question