tags:

views:

424

answers:

2

Hi,

I am trying to download a file using webclient in c#.

the remote port of the file location is 20114. How do I tell webclient to use 20114 port?

+3  A: 

set the url as http://www.website.com:20114/folder/file.ext

SillyMonkey
+1  A: 

My spontaneous guess (without having tried it) would be to simply include it in the url:

WebClient client = new WebClient();
client.DownloadFile(@"http://host:20114/file.ext", localFilename);
Fredrik Mörk