Export (0) Print
Expand All

How to: Override a Global Proxy Selection

This example sends a WebRequest to www.contoso.com that overrides the global proxy selection with a proxy server named alternateproxy on port 80.

Example

WebRequest req = WebRequest.Create("http://www.contoso.com/");
req.Proxy = new WebProxy("http://alternateproxy:80/");

Compiling the Code

This example requires:

  • References to the System.Net namespace.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft