Home All Groups Group Topic Archive Search About

how to set ftp port using vs 2005

Author
15 Mar 2006 4:49 AM
Rob Latour
OK, I give up, how do I set the FTP Port to be used in conjunction with
System.Net.FtpWebRequest

(in VB.NET 2005 I can set the PASV value, but I can't figure out how to
change the port)

Dim Request As System.Net.FtpWebRequest =
System.Net.FtpWebRequest.Create(uriString)

Request.UsePassive = True



Help would be appreciated.

Thanks, Rob

Author
16 Mar 2006 1:53 PM
Vadym Stetsyak
Hello, Rob!

RL> (in VB.NET 2005 I can set the PASV value, but I can't figure out how to
RL> change the port)

RL> Dim Request As System.Net.FtpWebRequest =
RL> System.Net.FtpWebRequest.Create(uriString)

RL> Request.UsePassive = True

RL> Help would be appreciated.

you mean the port you're connecting on?
if that is so you can add port to the url you specify for connection
e.g. ftp://myhost:359

Or

if you want to change the local endpoint FtpWebRequest uses, you can do it through ServicePoint.BindIPEndPointDelegate

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Author
16 Mar 2006 11:26 PM
Rob Latour
Perfect!  Thank you Vadym.

Show quote
"Vadym Stetsyak" <vady***@ukr.net> wrote in message
news:%23vQfLEQSGHA.4452@TK2MSFTNGP12.phx.gbl...
> Hello, Rob!
>
> RL> (in VB.NET 2005 I can set the PASV value, but I can't figure out how
> to
> RL> change the port)
>
> RL> Dim Request As System.Net.FtpWebRequest =
> RL> System.Net.FtpWebRequest.Create(uriString)
>
> RL> Request.UsePassive = True
>
> RL> Help would be appreciated.
>
> you mean the port you're connecting on?
> if that is so you can add port to the url you specify for connection
> e.g. ftp://myhost:359
>
> Or
>
> if you want to change the local endpoint FtpWebRequest uses, you can do it
> through ServicePoint.BindIPEndPointDelegate
>
> --
> Regards, Vadym Stetsyak
> www: http://vadmyst.blogspot.com

AddThis Social Bookmark Button