WebHttpBindingElement.BypassProxyOnLocal 属性

定义

获取或设置一个值,该值指示是否跳过代理服务器而使用本地地址。Gets or sets a value that indicates whether to bypass the proxy server for local addresses.

public:
 property bool BypassProxyOnLocal { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("bypassProxyOnLocal", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
public bool BypassProxyOnLocal { get; set; }
[<System.Configuration.ConfigurationProperty("bypassProxyOnLocal", DefaultValue=Mono.Cecil.CustomAttributeArgument)>]
member this.BypassProxyOnLocal : bool with get, set
Public Property BypassProxyOnLocal As Boolean

属性值

Boolean

如果跳过代理服务器而使用本地地址,则为 true;否则为 falsetrue to bypass the proxy server for local addresses; otherwise, false. 默认值为 falseThe default value is false.

属性

注解

如果 Internet 资源具有本地地址,则该资源是本地资源。An Internet resource is local if it has a local address. 本地地址是在同一台计算机上,本地 LAN 或 intranet 上的地址,在语法上,在 ) 缺少句点 http://webserver/ (。 http://localhost/A local address is one that is on same computer, the local LAN or intranet and is identified, syntactically, by the lack of a period (.) as in the URIs http://webserver/ and http://localhost/.

通过设置 BypassProxyOnLocal 属性可以确定在访问本地资源时,采用 WebHttpBindingElement 进行配置的终结点是否使用代理服务器。Setting the BypassProxyOnLocal property determines whether endpoints configured with the WebHttpBindingElement use the proxy server when accessing local resources.

如果 BypassProxyOnLocaltrue,则对本地 Internet 资源的请求不使用代理服务器。If BypassProxyOnLocal is true, requests to local Internet resources do not use the proxy server. BypassProxyOnLocalfalse 时,所有 Internet 请求都通过代理服务器进行。When BypassProxyOnLocal is false, all Internet requests are made through the proxy server.

适用于