How do i use ftpWebRequest with both CWD and non default port

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Claire

    How do i use ftpWebRequest with both CWD and non default port

    Hi,
    I was having problems changing directory using ftpWebRequest using the
    following constructs.

    ID ftp://qxxxx.net:4211 string << this works fine.

    ID "ftp://qxxxx.net/faer/:4211" string. Doesnt work
    ID "ftp://qxxxx.net/faer:4211" string. Doesnt work
    ID "ftp://qxxxx.net/%2F/faer:4211" string. Doesnt work
    ID "ftp://qxxxx.net/%2F/faer/:4211" string. Doesnt work
    ID "ftp://qxxxx.net/%2F/faer/ :4211" string. Doesnt work


    I was getting the error "Unable to connect to the remote server". So I ran
    WireShark to see what was happening.
    First construct works fine and I connect to 4211
    With the other constructs,the application appears to attempt to connect to
    port 21 rather than 4401.
    So, I'm assuming it's my string format that's incorrect.
    Can anyone correct it please?

  • Claire

    #2
    Re: How do i use ftpWebRequest with both CWD and non default port

    ftp://qxxx.net:4211/faer

    Comment

    • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

      #3
      Re: How do i use ftpWebRequest with both CWD and non default port

      Claire wrote:The URL syntax in general is:

      protocol://username:passwo rd@host:port/path?query

      so port is always after host.

      Arne

      Comment

      Working...