ProxyConfiguration.CanConnectDirectly ProxyConfiguration.CanConnectDirectly ProxyConfiguration.CanConnectDirectly ProxyConfiguration.CanConnectDirectly ProxyConfiguration.CanConnectDirectly Property

Definition

Gets a value that indicates if this configuration can connect directly.

Note

This class property is not supported on Windows Phone.

public : Platform::Boolean CanConnectDirectly { get; }
bool CanConnectDirectly();
public bool CanConnectDirectly { get; }
Public ReadOnly Property CanConnectDirectly As bool
var bool = proxyConfiguration.canConnectDirectly;
Property Value
bool bool bool

TRUE if this configuration can connect directly; otherwise, FALSE.

Remarks

There may be cases where CanConnectDirectly returns false, yet it does not mean you cannot access the resource directly. A local network could be configured to have support for both a proxy and network address translation (NAT). The WPAD script used to supply proxy information to a web browser or HttpClient tells Windows that it should use the proxy. But if you disregard the policy you can still go directly through NAT. This can cause problems when the remote endpoint is not expecting a connection from a proxy.

In a UWP app, the StreamSocket class supports connecting to a remote endpoint when proxies are required to complete the connection. This support for proxies is automatic and transparent to the app. For more detailed information, see the remarks on Support for proxies in the StreamSocket class reference.

See Also