network connection stops working after 5-7 successful connections

  • Thread starter Thread starter Damon Payne
  • Start date Start date
D

Damon Payne

I did my duedilligence and searched before posting this, I did not find
an answer to my issue.

I am using the new OpenNetCF FTP classes to FTP a series of images to a
server. After several successful connections, this error happens each
time:

Exception: System.Net.Sockets.SocketException
Message: No connection could be made because the target machine
actively refused it.

The device is CE.Net, sitting in a cradle, the communications are
happening over active sync.

All of the streams releated to the connections are closed in finally{}
blocks. The error does not go away without re-starting the application
or sometimes the device. It seems as though some type of TCP resources
are not being cleaned up until the entire program exits. I have tried
sleeping after each connection, Calling GC and WaitOnPendingFinalizers.
(I know its ridiculous)

I'm looking for ideas as to what else I could try to force the "clean
up" of whatever resources/settings/sockets/DNS could be causing the
issue. I'll try any crazy idea at this point.
 
I don't know what to do to fix it, but it sounds to me like a problem with
ActiveSync. Can you try it with a real network connection rather than the
kind-of AS connection?

Paul T.
 
Paul, I agree that it seems like AS is the culprit. I'll need to go
into the office and get some different hardware to try a real
connection.
I'm also going to try AS 4.0.
If it is an AS resource issue, I could try dropping/restarting the AS
connection when the error occurs, not ideal but might work. Do you
know of a resource listing the command line args to repllog.exe ?
 
Active Sync 4 made a small difference, in that it takes a little longer
for it to crash.
 
Paul,
With a regular connection (Wifi) I can FTP more than 54 images with no
errors. Using Process/Start it doesn't seem like repllog can reliably
stop/start active sync, at least on my devices. Any ideas for working
around the ActiveSync issue?
 
No. If you have prepaid support incidents, I'd report this to Microsoft PSS
in hopes of some sort of a fix.

Are you connecting each time you transfer an image, or are some resources
reused during the transfer? You might change from passive to active
connection to the FTP server and see if that helps or hurts. At a guess,
I'd say that it's probably running out of sockets somehow/somewhere and so
it looks like the server isn't running.

Paul T.
 
I have tried active and passive, no difference. What's especially odd
is that this same system has a custom web-service based sync process,
it makes hundreds of HttpReqeusts with no issues. Given that, I may
try to switch over to HTTP PUT instead. Thanks for the ideas.

-Damon
 
Back
Top