Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2k views
in .NET FTP by (220 points)
We've been getting SocketExceptions in our production environment at the end of a file upload.

What I have is a Windows Service runnining on Windows Server 2003 (with .net 1.1) that automatically uploads a 200-300 MB zip file to an external web server (also Win 2k3 server with .net 1.1). The service will do all but the last few bytes of the upload and then aborts with a Socket exception. We are only doing a single upload at any given time and the upload process runs on a single thread.

Have not been able to reproduce the error from my development machine (WinXP Pro) or from a local Win2k3 test server running in Virtual PC connecting to the same web server. In development/test environment, I have been able to reliably upload files up to 500 MB with no errors.

We can successfully upload the zip files using the command line ftp client and Filezilla GUI FTP Client.

Any ideas on what could be happening here or any steps I can take to determine what is causing the errors?

Here is the actual error and stack trace:
System.IO.IOException: Unable to read data from the transport connection. ---> System.Net.Sockets.SocketException: 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
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.ReadLine()
at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadReply()
at EnterpriseDT.Net.Ftp.FTPClient.ValidateTransfer()
at EnterpriseDT.Net.Ftp.FTPClient.Put(String localPath, String remoteFile, Boolean append)
at EnterpriseDT.Net.Ftp.FTPClient.Put(String localPath, String remoteFile)
at Xhibitnet.LvsController.FileTransfer.TransferArchive() in C:\xhibitnet\GMRI\LVSController\LvsControlAndMonitorSystem\trunk\LvsControlAndMonitorSolution\ArtifactProcessorLibrary\FileTransfer.cs:line 530



Thanks,
Shawn.

1 Answer

0 votes
by (162k points)
If you are using active mode try passive and vice versa

We've been getting SocketExceptions in our production environment at the end of a file upload.

Categories

...