Results 1 to 6 of 6

Thread: FTP using WinnetCF

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2009
    Location
    Hawaii
    Posts
    24

    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

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    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
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2009
    Location
    Hawaii
    Posts
    24

    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?

  4. #4
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    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?
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Apr 2009
    Location
    Hawaii
    Posts
    24

    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?

  6. #6
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    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
    Last edited by petevick; Aug 18th, 2009 at 01:03 AM.
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width