Share via


BasicHttpBinding.ProxyAddress 속성

정의

HTTP 프록시의 URI 주소를 가져오거나 설정합니다.

public:
 property Uri ^ ProxyAddress { Uri ^ get(); void set(Uri ^ value); };
public Uri ProxyAddress { get; set; }
[System.ComponentModel.TypeConverter(typeof(System.UriTypeConverter))]
public Uri ProxyAddress { get; set; }
member this.ProxyAddress : Uri with get, set
[<System.ComponentModel.TypeConverter(typeof(System.UriTypeConverter))>]
member this.ProxyAddress : Uri with get, set
Public Property ProxyAddress As Uri

속성 값

Uri

HTTP 프록시의 주소로 사용되는 Uri입니다. 기본값은 null입니다.

특성

예제

다음 예제에서는 애플리케이션 설정에 ProxyAddress를 설정합니다.

// Get base address from app settings in configuration
Uri baseAddress = new Uri(ConfigurationManager.AppSettings["baseAddress"]);

BasicHttpBinding binding = new BasicHttpBinding();

binding.ProxyAddress = baseAddress;

이 속성의 값은 구성 파일에서 설정할 수도 있습니다.

<configuration>
  <system.serviceModel>

    <bindings>
      <basicHttpBinding>
        <binding name="Binding1"
                 proxyAddress = "http://myProxy">
          <security mode="None" />
        </binding>
      </basicHttpBinding>
    </bindings>

  </system.serviceModel>

</configuration>

설명

UseDefaultWebProxytrue설정된 경우 기본 주소가 사용되고 ProxyAddress 집합의 값이 무시됩니다.

적용 대상