Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting port in FtpWebRequest

I need the user to be able to be able to modify the port for downloading FTP information - but I can't find a way of changing this in FtpWebRequest.

like image 576
Chris Avatar asked Dec 29 '22 05:12

Chris


1 Answers

Isn't the port just part of the URI used to create the web request?

FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://10.0.0.1:12345");
like image 100
Dismissile Avatar answered Jan 13 '23 07:01

Dismissile