HttpWebClientProtocol.Proxy 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
방화벽을 통해 XML 웹 서비스 요청을 만들기 위한 프록시 정보를 가져오거나 설정합니다.
public:
property System::Net::IWebProxy ^ Proxy { System::Net::IWebProxy ^ get(); void set(System::Net::IWebProxy ^ value); };
[System.ComponentModel.Browsable(false)]
public System.Net.IWebProxy Proxy { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.Proxy : System.Net.IWebProxy with get, set
Public Property Proxy As IWebProxy
속성 값
IWebProxy 방화벽을 통해 요청을 만들기 위한 프록시 정보가 포함된 항목입니다. 기본값은 운영 체제 프록시 설정입니다.
- 특성
예제
다음은 XML 웹 서비스를 호출 Math 하기 전에 프록시 설정을 설정하는 예제입니다. 프록시 서버 http://proxyserver는 80으로, 프록시 포트는 80으로, 로컬 주소는 프록시 서버에 대한 바이패스입니다.
MyMath::Math^ math = gcnew MyMath::Math;
// Set the proxy server to proxyserver, set the port to 80, and specify to bypass the proxy server
// for local addresses.
IWebProxy^ proxyObject = gcnew WebProxy( "http://proxyserver:80",true );
math->Proxy = proxyObject;
// Call the Add XML Web service method.
int total = math->Add( 8, 5 );
MyMath.Math math = new MyMath.Math();
// Set the proxy server to proxyserver, set the port to 80, and specify to bypass the proxy server
// for local addresses.
IWebProxy proxyObject = new WebProxy("http://proxyserver:80", true);
math.Proxy = proxyObject;
// Call the Add XML Web service method.
int total = math.Add(8, 5);
Dim math As New MyMath.Math()
' Set the proxy server to proxyserver, set the port to 80, and specify
' to bypass the proxy server for local addresses.
Dim proxyObject As New WebProxy("http://proxyserver:80", True)
math.Proxy = proxyObject
' Call the Add XML Web service method.
Dim total As Integer = math.Add(8, 5)
설명
클라이언트가 시스템 설정과 Proxy 다른 프록시 설정을 사용해야 하는 경우 이 속성을 사용합니다. 클래스를 WebProxy 사용하여 프록시 설정을 설정합니다.IWebProxy
기본 프록시 설정은 구성 파일에서 설정할 수 있습니다. 자세한 내용은 인터넷 애플리케이션 구성을 참조하세요.