ערוך

שתף באמצעות


EndpointAddress.IsAnonymous Property

Definition

Gets a value that indicates whether the endpoint is anonymous.

public:
 property bool IsAnonymous { bool get(); };
public bool IsAnonymous { get; }
member this.IsAnonymous : bool
Public ReadOnly Property IsAnonymous As Boolean

Property Value

true if the endpoint is AnonymousUri; otherwise, false.

Examples

EndpointIdentity endpointIdentity =
    EndpointIdentity.CreateUpnIdentity(WindowsIdentity.GetCurrent().Name);
EndpointAddress endpointAddress = new EndpointAddress(
    new Uri
    ("http://localhost:8003/servicemodelsamples/service/incode/identity"),
    endpointIdentity, addressHeaders);

// bool isAnonymous = endpointAddress.IsAnonynmous;

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.

Applies to