|
-
Dec 17th, 2008, 04:53 AM
#1
Thread Starter
Frenzied Member
[2008] My.Computer.Network.DownloadFile Problem
Good Morning everyone,
Here is the line of code my program is failing on:
My.Computer.Network.DownloadFile("ftp://servertoconnecto/folder/file.txt", "C:\folder\file.txt", "username", "password")
And here is the error I am getting:
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive.
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at Microsoft.VisualBasic.MyServices.Internal.WebClientCopy.DownloadFile(Uri address, String destinationFileName)
at Microsoft.VisualBasic.Devices.Network.DownloadFile(Uri address, String destinationFileName, ICredentials networkCredentials, Boolean showUI, Int32 connectionTimeout, Boolean overwrite, UICancelOption onUserCancel)
at Microsoft.VisualBasic.Devices.Network.DownloadFile(String address, String destinationFileName, String userName, String password, Boolean showUI, Int32 connectionTimeout, Boolean overwrite, UICancelOption onUserCancel)
at Microsoft.VisualBasic.Devices.Network.DownloadFile(String address, String destinationFileName, String userName, String password)
at IT_Management_Client.Updater.Updates.Check()
Anyone have any ideas?
This has been a nitemare part of our project at first all I was getting was PASV problems which we managed to fix and after that the Download code worked perfectly but the uploads were failing with:
Access Denied from the ISA Server which I fixed now I am getting the above but ftp works perfectly if I use Command Prompt from the same machine to the same destination (it is across the internet) but I can upload and download fine.
Anyone got any suggestions?
Thanks,
Max
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|