ServiceEndpoint.Address ServiceEndpoint.Address ServiceEndpoint.Address ServiceEndpoint.Address Property


Gets or sets the endpoint address for the service endpoint.

 property System::ServiceModel::EndpointAddress ^ Address { System::ServiceModel::EndpointAddress ^ get(); void set(System::ServiceModel::EndpointAddress ^ value); };
public System.ServiceModel.EndpointAddress Address { get; set; }
member this.Address : System.ServiceModel.EndpointAddress with get, set
Public Property Address As EndpointAddress

Property Value

The EndpointAddress that specifies the location of the service endpoint.


The following example shows how to add a ServiceEndpoint to an existing ServiceHost and display the address property:

ServiceEndpoint endpnt = serviceHost.AddServiceEndpoint(
    new WSHttpBinding(),

Console.WriteLine("Address: {0}", endpnt.Address);
Dim endpnt As ServiceEndpoint = serviceHost.AddServiceEndpoint(GetType(ICalculator), New WSHttpBinding(), "CalculatorServiceObject")

Console.WriteLine("Address: {0}", endpnt.Address)


The default value of ListenUri at which the service endpoint listens is provided by Uri of the EndpointAddress returned by Address.

Applies to