Share via


EndpointAddress.AnonymousUri Property

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

Gets a version-neutral representation of the anonymous URI.

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

Syntax

'Declaration
Public Shared ReadOnly Property AnonymousUri As Uri
public static Uri AnonymousUri { get; }

Remarks

If the value of the URI used to initialize the constructor is the AnonymousUri, then IsAnonymous is set to true.

EndpointAddress is a version-neutral class and the AnonymousUri property returns a value that is a neutral representation. When you write this out or convert this to one version or the other, then it turns into the right value for that version.

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

            ' Endpoint address with the anonymous URI. 
            Dim anonUri As Uri = EndpointAddress.AnonymousUri
            Dim anonUriEndpointAddress As New EndpointAddress(anonUri)

            'Confirm the address is anonymous
            Dim boolAnonUri1 As Boolean = anonUriEndpointAddress.IsAnonymous
// Endpoint address with the anonymous URI. 
Uri anonUri = EndpointAddress.AnonymousUri;
EndpointAddress anonUriEndpointAddress = new EndpointAddress(anonUri);

//Confirm the address is anonymous
bool boolAnonUri1 = anonUriEndpointAddress.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.