-
FTP using WinnetCF
Because this is winnetcf not sure if anyone can answer me. I'm not sure what i'm doing wrong. I looked at quite a few forums and it would seem that it would work. I get a "NotSupportedException at System.Net.WebRequest.Create()"
Code:
Imports OpenNETCF.Net.Ftp
Imports System.Net
Private Sub ftp()
...
Dim testUri As New Uri("ftp://11.22.333.44")
Dim fwr As FtpWebRequest = FtpWebRequest.Create(testUri)
fwr.Credentials = New NetworkCredential(un, pw)
fwr.Method = WebRequestMethods.Ftp.DownloadFile
...
end sub
-
Re: FTP using WinnetCF
Hi,
NotSupportedException is a big clue.
Not everything that is supported on the desktop is supported in .Net CF
There is an alternate way to do what you want detailed in one of Jim Wilson's excellent 'How Do I' videos here
-
Re: FTP using WinnetCF
I copied it exactly like the video but exact same error. Does this error mean system.net doesnt support the create function?
-
Re: FTP using WinnetCF
I have sucessfully used the code provided in the video to download files in the past - have you tried the sample as is, and does it work?
-
Re: FTP using WinnetCF
It works as is. I was trying to use ftp in the url and i think thats why it crashes. This works if its a public file, but is there no way to download a password protected ftp file?
-
Re: FTP using WinnetCF
Hi,
you asked this in the opennetcf forums - as you are trying to use thier FTP?
Alternately, take a look at this or use straight FTP