PC Review


Reply
Thread Tools Rate Thread

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

 
 
Claire
Guest
Posts: n/a
 
      3rd Jul 2008
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?

 
Reply With Quote
 
 
 
 
Claire
Guest
Posts: n/a
 
      3rd Jul 2008
ftp://qxxx.net:4211/faer
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      3rd Jul 2008
Claire wrote:
> ftp://qxxx.net:4211/faer


The URL syntax in general is:

protocol://usernameassword@hostort/path?query

so port is always after host.

Arne
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FtpWebRequest sends an invalid PORT command Tsahi Asher Microsoft Dot NET 2 28th Nov 2010 07:34 PM
FtpWebRequest sends an invalid PORT command Tsahi Asher Microsoft C# .NET 3 28th Nov 2010 07:34 PM
FtpWebRequest sends an invalid PORT command Tsahi Asher Microsoft VB .NET 2 28th Nov 2010 07:34 PM
change iis default port Carl Windows XP Embedded 0 22nd Apr 2008 12:55 AM
changing the default port Mike Windows XP Work Remotely 4 27th Nov 2003 09:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:50 PM.