ServiceEndpoint ServiceEndpoint ServiceEndpoint ServiceEndpoint Class


Represents the endpoint for a service that allows clients of the service to find and communicate with the service.

public ref class ServiceEndpoint
public class ServiceEndpoint
type ServiceEndpoint = class
Public Class ServiceEndpoint


Uri baseAddress = new Uri("http://localhost:8001/Simple");
ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);

ContractDescription cd = new ContractDescription("Calculator");
ServiceEndpoint svcEndpoint = new ServiceEndpoint(cd);

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

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

// Enable Mex
ServiceMetadataBehavior smb = new ServiceMetadataBehavior();
smb.HttpGetEnabled = true;

Dim baseAddress As New Uri("http://localhost:8001/Simple")
Dim serviceHost As New ServiceHost(GetType(CalculatorService), baseAddress)

Dim cd As New ContractDescription("Calculator")
Dim svcEndpoint As New ServiceEndpoint(cd)

Dim endpnt As ServiceEndpoint = serviceHost.AddServiceEndpoint(GetType(ICalculator), New WSHttpBinding(), "CalculatorServiceObject")

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

' Enable Mex
Dim smb As New ServiceMetadataBehavior()
smb.HttpGetEnabled = True



The service endpoint contains the information about the address, binding, contract, and behavior required by a client to find and interact with the service at this endpoint.


ServiceEndpoint(ContractDescription) ServiceEndpoint(ContractDescription) ServiceEndpoint(ContractDescription) ServiceEndpoint(ContractDescription)

Initializes a new instance of the ServiceEndpoint class for a specified contract.

ServiceEndpoint(ContractDescription, Binding, EndpointAddress) ServiceEndpoint(ContractDescription, Binding, EndpointAddress) ServiceEndpoint(ContractDescription, Binding, EndpointAddress) ServiceEndpoint(ContractDescription, Binding, EndpointAddress)

Initializes a new instance of the ServiceEndpoint class with a specified contract, binding, and address.


Address Address Address Address

Gets or sets the endpoint address for the service endpoint.

Behaviors Behaviors Behaviors Behaviors

Gets the behaviors for the service endpoint.

Binding Binding Binding Binding

Gets or sets the binding for the service endpoint.

Contract Contract Contract Contract

Gets the contract for the service endpoint.

EndpointBehaviors EndpointBehaviors EndpointBehaviors EndpointBehaviors

Gets the endpoint behaviors for the service.

IsSystemEndpoint IsSystemEndpoint IsSystemEndpoint IsSystemEndpoint

Gets or sets whether the service endpoint is generated by the system as opposed to being user-defined.

ListenUri ListenUri ListenUri ListenUri

Gets or sets the URI at which the service endpoint listens.

ListenUriMode ListenUriMode ListenUriMode ListenUriMode

Gets or sets how the transport handles the URI that is provided for the service to listen on.

Name Name Name Name

Gets or sets the name of the service endpoint.


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to