EndpointAddress.IsAnonymous Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a value that indicates whether the endpoint is anonymous.

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

public bool IsAnonymous { get; }

Property Value

Type: System.Boolean

true if the endpoint is AnonymousUri; otherwise, false.

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.

EndpointIdentity endpointIdentity =
EndpointAddress endpointAddress = new EndpointAddress(
	new Uri
	endpointIdentity, addressHeaders);

// bool isAnonymous = endpointAddress.IsAnonynmous;

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top