Login  
Search All Forums
Dart Home | PowerTCP Sockets for .NET | Custom Development Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
AuthorForum: PowerTCP Sockets for .NET (Secure and Standard)
Topic: Unreliable on extended metwork
cxnoel

From: Laval, QC USA
Posts: 9
Member Since: 01/30/04
posted May 15, 2006 12:14 PM

I have a client/server application using TCP/IP protocol. It is working fine on our domain network. I have 2 clients that are located on a separate domain network connected to our network by a network extension.

Until recently, I was using the Microsoft Winsock component (using VB6) on both ends of the connection (server & client) using port 3100. The connection was very reliable and never failed, even for clients located on the extended network. Now, I rebuilt the server side with VB.NET using the Dart PowerTCP component and using port 58500. While it is still very reliable within our network, it is less on the extended network. The connection may be fine for few hours or days then, the server reports a "connection forcibly closed by the remote host". The worst thing is that the client side (still using the Microsoft Winsock control) is not aware of the broken connection; it stays in connected status.

Something more I can say if that the e.Tcp.RemoteEndPoint does not return the real remote address (on the extended network) but the last address in the route which belongs to our network (when I trace the route, there are 3 IP addresses from our network and 3 from the extended network).

Does anyone has an idea of what can be done to improve the stability of the connection?

Thanks a lot

Claude
Amit

From: Rome, NY USA
Posts: 315
Member Since: 03/15/06
posted May 17, 2006 12:42 PM

Hello,

Regarding the query, what I can understand is that you have working on the server application and is getting an error message "Connection forcibly closed".

If this is the said scenario, then please note that the above mentioned error message normally occurs when Client or Server application is suddenly stopped or the host is rebooted. It may also be due to the host or remote network interface disabled or the remote host using a hard close.

I would appreciate if you could provide me with the following information to narrow down the situation further:

(1) How is the Extended network connected to your network, is it through Intranet or Internet. Also let me know if you have any other specification for the connection?

(2) If it is connected through a router, then whether this Router has NAT enabled?

(3) Is the router having sufficient number of ports opened? It could be a possibility that if the number of ports requested exceeds the number of ports available, then the existing connection may be closed.

(4) I will appreciate if you can provide us with the trace log. You may always create a Trace Log by using the Trace event.

(5) Also please let me know if you are able to replicate the error by running our sample projects, provided with the Sockets for .Net? You may find these Sample projects at the location below on your machine: C:\Program Files\PowerTCP\Sockets for .NET\Samples

Regarding the query of e.Tcp.RemoteEndPoint not returning the real remote address, I would request you to please send in the valuable inputs on the information requested above. It would help me immensely in zeroing down on the problem and in pursuing a remedy too.

Have a nice day ahead.

Regards,
Amit
stefana99
stefana@nd.is

From: Reykjavik, NE Iceland
Posts: 2
Member Since: 04/07/06
posted August 30, 2006 4:57 AM

Hi, Im having this same problem, I'm connecting to black boxes in cars through gprs. The connection is made through the telephone operator to us.

It seems to me that the connection is alive on the Windows server and the thread is alive but the connection to the black box is broken.
I have around 300 concurrent connections when they are all alive.

The exceptions occur around 2-4 times per minute.

I'm using version 1.03 of the server component.

Best regards,
Stefan
Amit

From: Rome, NY USA
Posts: 315
Member Since: 03/15/06
posted August 31, 2006 1:26 PM

Hello Stefan,

Regarding the query, I would appreciate if you could provide us the following information so that we can narrow down the issue further:

(1) Please let us know whether you are using a trial version of the product, and if not, which licensed version of the product do you have running?

(2) Are you getting the same exception message: “Connection forcibly closed by the remote host”? If not, then please provide us the exact exception message.

(3) I will appreciate if you can provide us the trace log. You may always create a Trace Log by using the Trace event.

(4) Also please let me know if you are able to replicate the error by running our sample projects, provided with the Sockets for .Net? You may find these Sample projects at the location below on your machine:

C:\Program Files\PowerTCP\Sockets for .NET\Samples

Any further information to isolate the issue would be highly appreciated.

Best Regards,
Amit
stefana99
stefana@nd.is

From: Reykjavik, NE Iceland
Posts: 2
Member Since: 04/07/06
posted September 1, 2006 4:40 AM

Hi Amit,

Thanks for your reply.

1. We are using the registered product.
2. This is the error message we are getting.
3. I'll modify the code to allow tracing, and send you the results.
4. The main functionality is the same as provided with your server samples.
      try
      {
        do
        { ...
        } while (e.Tcp.Connected);
       }

Best regards,
Stefan
cxnoel

From: Laval, QC USA
Posts: 9
Member Since: 01/30/04
posted September 1, 2006 7:52 AM

Just to let you know that I haven't get the problem for a while, maybe since I put the following lines on before the while e.tcp.connected sentence:

    With e.Tcp
      .DoEvents = True
      .KeepAlive = True
      .NoDelay = True
      .ReuseAddress = True
      .SendTimeout = 5000
    End With
Amit

From: Rome, NY USA
Posts: 315
Member Since: 03/15/06
posted September 1, 2006 1:36 PM

Hello Stefan,

Regarding the query, please note that the said error message normally occurs when Client or Server application is suddenly stopped or the host is rebooted. It may also be due to the host or remote network interface disabled or the remote host using a hard close.

I would suggest you to please send us the Trace log so that we can narrow down the issue further.

As suggested already, I would suggest you to try setting the KeepAlive property to true. This property is generally used in those scenarios where a connection remains inactive for a loner period of time. When you set this property to true, it causes the underlying Socket of the Tcp component to probe the other end of a connection when it has been idle for an allotted amount of time.

Any further information to isolate the issue would be highly appreciated.

Have a nice day.

Best Regards,
Amit
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX