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

C

Claire

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?
 
A

Arne Vajhøj

Claire said:
ftp://qxxx.net:4211/faer

The URL syntax in general is:

protocol://username:password@host:port/path?query

so port is always after host.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top