BindingContext.ListenUriRelativeAddress Property


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

Gets or sets the URI that provides the relative address at which the service endpoint listens.

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

public string ListenUriRelativeAddress { get; set; }

Property Value

Type: System.String

The relative address at which the service endpoint listens.

The address for the endpoint at which a service listens is obtained by appending the ListenUriRelativeAddress to the ListenUriBaseAddress. This absolute address can be set using the ListenUri property.

CustomBinding binding = new CustomBinding();
BindingParameterCollection bpCol = new BindingParameterCollection();
BindingContext context = new BindingContext(binding, bpCol);
string relAddress = context.ListenUriRelativeAddress;

.NET Framework
Available since 3.0
Return to top