HttpTransportBindingElement.ProxyAuthenticationScheme 屬性

定義

取得或設定驗證配置,用於驗證由 HTTP Proxy 處理的用戶端要求。

public:
 property System::Net::AuthenticationSchemes ProxyAuthenticationScheme { System::Net::AuthenticationSchemes get(); void set(System::Net::AuthenticationSchemes value); };
public System.Net.AuthenticationSchemes ProxyAuthenticationScheme { get; set; }
member this.ProxyAuthenticationScheme : System.Net.AuthenticationSchemes with get, set
Public Property ProxyAuthenticationScheme As AuthenticationSchemes

屬性值

AuthenticationSchemes

AuthenticationSchemes 列舉值,指定用於 Proxy 上用戶端驗證的通訊協定。 預設為 Anonymous

範例

下列範例會將這個屬性設定為在對 ProxyAddress 屬性所指定之 Proxy 傳送要求時使用。

HttpTransportBindingElement httpBinding = new HttpTransportBindingElement();  
httpBinding.ProxyAddress = new Uri(http://proxyserver);  
httpBinding.ProxyAuthenticationScheme = AuthenticationSchemes.Digest;  

適用於