views:

30

answers:

1

Hi All,

I have a windows service (VB.NET) which downloads files from a server after a specific interval. What happens if it try to download a file when its upload is in progress?

If it creates some problem, how to cope with this situation?

Thanks, Imran

+2  A: 

It depends on the implementation of the FTP server.
Most servers will probably throw an access denied exception when downloading the file, which you can catch. (Catch a WebException and look at the response and/or the status code)

SLaks
+1 Yup; they'll return the appropriate FTP error code, which will be contained in the WebException
Andrew Barber