Building FTP Services Using .NET 2.0
Subject:   System.Net.WebException
Date:   2007-03-06 11:29:45
From:   tuzojazz
I'm writing the application which downloads a file from a remote server

I get an "System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive" most of times at client.

The size of the file is 5 MB.

When I try to download a smaller file (1 KB) from the remote server the application works successfully.

What could be wrong?

I suppose the problem is the bandwidth and/or the time out and this is the reason why the application sometimes works and other does not.

do I need to setup something on the server or my PC?