Groups | Blog | Home
all groups > vj# > may 2005 >

vj# : setting socks proxy option in vj# - more hurdles for .NET migratio


Babu
5/6/2005 7:31:07 AM
It used to be so easy in vj++ and java, to set socks proxy for sockets:

Properties p = System.getProperties();
p.put("socksProxyHost",host);
p.put("socksProxyPort",port);
Socket skt = new Socket("hello.com", 81);

If you run the above code behind socks proxy server, it worked so well in
vj++. In fact, vj++ program can make use Internet Explorer socks proxy
settings and you don't have to set System.getProperties().

Unfortunately, the above code no longer works in vj#. Any attempt to open
sockets fails if your PC is setting behind a socks proxy server.

Will someone from Microsoft help me?

Regards
Babu



Lars-Inge Tønnessen [VJ# MVP]
5/18/2005 7:55:19 PM

Does this help?

System.Net.WebRequest request =
System.Net.WebRequest.Create("http://somethinghere.com");
request.set_Proxy( ... );


Regards,
Lars-Inge Tønnessen

AddThis Social Bookmark Button