WebRequest without IE dependency

  • Thread starter Thread starter Thana N.
  • Start date Start date
T

Thana N.

Hi,

I would like to know how to use WebRequest without IE dependency. I know
that if I has my own proxy setting via WebProxy, it will use value from
WebProxy. But how can I do if I want to set my program with no proxy when
IE has its own proxy settings.

Thanks in advance,
Thana N.
 
Thana said:
Hi,

I would like to know how to use WebRequest without IE dependency. I
know that if I has my own proxy setting via WebProxy, it will use
value from WebProxy. But how can I do if I want to set my program
with no proxy when IE has its own proxy settings.

Use GlobalProxySelection.GetEmptyWebProxy(), e.g.

HttpWebRequest request = WebRequest.Create(uri) as HttpWebRequest;
request.Proxy = GlobalProxySelection.GetEmptyWebProxy();

Cheers,
 
That's what I'm looking for.

Thanks,
Thana N.

Joerg Jooss said:
Use GlobalProxySelection.GetEmptyWebProxy(), e.g.

HttpWebRequest request = WebRequest.Create(uri) as HttpWebRequest;
request.Proxy = GlobalProxySelection.GetEmptyWebProxy();

Cheers,
 
Back
Top