Freigeben über


EndpointAddress.IsAnonymous Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a value that indicates whether the endpoint is anonymous.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

Syntax

'Declaration
Public ReadOnly Property IsAnonymous As Boolean
public bool IsAnonymous { get; }

Property Value

Type: System.Boolean
true if the endpoint is AnonymousUri; otherwise, false.

Remarks

Use this method to check for the AnonymousUri when manually copying the URI from an EndpointAddress to the URI of either a EndpointAddress10 or a EndpointAddressAugust2004. This must be done because both EndpointAddress10 and EndpointAddressAugust2004 have special anonymous values. Users must use these values if the URI being copied is anonymous.

Due to the range of network technologies currently in widespread use (for example, NAT, DHCP, and firewalls), many deployments cannot assign a meaningful global URI to a given endpoint. To allow these anonymous endpoints to initiate message exchange patterns and receive replies, the Web Services Addressing specification defines a URI for use by endpoints that cannot have a stable, resolvable URI.

Requests that use this address must provide some mechanism for delivering replies or faults (for example, returning the reply on the same transport connection). This mechanism can be a request/reply transport protocol (for example, HTTP GET or POST). This URI can be used as the destination for reply messages and should not be used as the destination in other circumstances.

Examples

            ' Confirm endpoint address has an anonymous URI. 
            Dim anonEndpointAddress As New EndpointAddress(EndpointAddress.AnonymousUri)
            Dim boolAnonUri2 As Boolean = anonEndpointAddress.IsAnonymous
// Confirm endpoint address has an anonymous URI. 
EndpointAddress anonEndpointAddress = new EndpointAddress(EndpointAddress.AnonymousUri);
bool boolAnonUri2 = anonEndpointAddress.IsAnonymous;

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.