다음을 통해 공유


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.

예제

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

코드 컴파일

This example requires:

  • References to the System.Net namespace.

참고 항목

개념

Using Application Protocols

Accessing the Internet Through a Proxy