BasicHttpBinding.ProxyAddress Özellik

Tanım

HTTP ara sunucusunun URI adresini alır veya ayarlar.

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

Özellik Değeri

Uri

Uri HTTP ara sunucusunun adresi olarak hizmet veren bir. Varsayılan değer boştur.

Öznitelikler

Örnekler

Aşağıdaki örnek ProxyAddress'i uygulama ayarlarına ayarlar.

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

BasicHttpBinding binding = new BasicHttpBinding();

binding.ProxyAddress = baseAddress;

Bu özelliğin değeri yapılandırma dosyasında da ayarlanabilir.

<configuration>
  <system.serviceModel>

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

  </system.serviceModel>

</configuration>

Açıklamalar

UseDefaultWebProxy olarak ayarlanırsatrue, varsayılan adres kullanılır ve ProxyAddress kümesinin değeri yoksayılır.

Şunlara uygulanır