WebRequest without IE dependency

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.
 
J

Joerg Jooss

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,
 
T

Thana N.

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top