ServiceHostBase.AddServiceEndpoint Method (ServiceEndpoint)
Adds the specified service endpoint to the hosted service.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
When using the method, the service host does a "by-configuration-name" validation on the contract description. In other words, the host verifies that ConfigurationName exists in the list of configuration names of the service contracts implemented by the service. If the validation passes, the description in the ServiceEndpoint is used as it is, even if the ContractDescription reflected from the service is different.
As an example, assume that the description in the ServiceEndpoint and the contract description reflected from the service have the same name, but different operation behaviors. The implication of only “by-configuration-name” validation is that there is no validation that the behaviors are the same and there are one updates to one description because of another description.
If the address is a relative URI, one of the base addresses of the ServiceHost (depending on the binding protocol) is used as the endpoint's base address.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)