BasicHttpBinding.UseDefaultWebProxy BasicHttpBinding.UseDefaultWebProxy BasicHttpBinding.UseDefaultWebProxy BasicHttpBinding.UseDefaultWebProxy Property

定义

获取或设置一个值,该值指示是否应使用系统的自动配置 HTTP 代理(如果可用)。Gets or sets a value that indicates whether the auto-configured HTTP proxy of the system should be used, if available.

public:
 property bool UseDefaultWebProxy { bool get(); void set(bool value); };
public bool UseDefaultWebProxy { get; set; }
member this.UseDefaultWebProxy : bool with get, set
Public Property UseDefaultWebProxy As Boolean

属性值

如果应使用系统的自动配置 HTTP 代理(如果可用),则为 true;否则为 falsetrue if the auto-configured HTTP proxy of the system should be used, if available; otherwise, false. 默认值为 trueThe default value is true.

示例

此示例设置的值为 UseDefaultWebProxy falseThis example sets the value of UseDefaultWebProxy to false.

BasicHttpBinding binding = new BasicHttpBinding();
binding.UseDefaultWebProxy = false;

也可以在配置文件中设置此属性的值。The value of this property can also be set in the configuration file.

注解

将此属性为出错trueProxyAddress为非空。It is an error for this to be true and ProxyAddress to be non-null.

适用于