By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,565 Members | 1,677 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,565 IT Pros & Developers. It's quick & easy.

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

P: n/a
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?

Jul 3 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a

P: n/a
Claire wrote:
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
Jul 3 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.