I have a WCF service that is hosted in a Windows Service. Clients that using this service must pass an identifier every time they\'re calling service methods (because that i
This is similar to NimsDotNet answer but shows how to do it programmatically.
Simply add the header to the binding
var cl = new MyServiceClient();
var eab = new EndpointAddressBuilder(cl.Endpoint.Address);
eab.Headers.Add(
AddressHeader.CreateAddressHeader("ClientIdentification", // Header Name
string.Empty, // Namespace
"JabberwockyClient")); // Header Value
cl.Endpoint.Address = eab.ToEndpointAddress();