Posted on 2006-03-30
Hi, I am trying to use webclient.downloadfile. I have a virtual folder set up with a particular user. The file is in the folder I want to download from, all is correct there, but when I try to download, I receive a "Not found" error. I have tried a million settings but am about to give up. The file is kind of big, so I don't know if that's an issue, but here's my code:
sURL = sURL.Substring(0, sURL.LastIndexOf("/") + 1) & "p.db"
webfile = New WebClient
Dim mycache As CredentialCache = New CredentialCache
mycache.Add(New Uri(sURL), "Basic", New NetworkCredential("validuser", "validpassword"))
webfile.Credentials = mycache
webfile.DownloadFile(sURL, sPath & "p.db")
I just added the cache stuff today. The user isn't really a basic user, it's added in under Anonymous Access.
Oh yes, I don't think this is using the default port, don't know if that matters.
Anyone know why I would get a file not found error?