How to: Override a Global Proxy Selection

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


WebRequest req = WebRequest.Create("");  
req.Proxy = new WebProxy("http://alternateproxy:80/");  
Dim req As WebRequest = WebRequest.Create("")  
req.Proxy = New WebProxy("http://alternateproxy:80/")  

Compiling the Code

This example requires:

See also