Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This example creates a global proxy instance that will enable any WebRequest to use a proxy to communicate with the Internet. The example assumes that the proxy server is named webproxy and that it communicates on port 80, the standard HTTP port.
Example
WebProxy proxyObject = new WebProxy("http://webproxy:80/");
GlobalProxySelection.Select = proxyObject;
Dim proxyObject As WebProxy = New WebProxy("http://webproxy:80/")
GlobalProxySelection.Select = proxyObject
Compiling the Code
This example requires:
- References to the System.Net namespace.