public static EndpointAddress CreateTcpEndPointAddress(string hostname, int port, string expectedServerIdentityFormat) { EndpointIdentity i; string expectedServerIdentity = string.Format(expectedServerIdentityFormat, hostname); if (expectedServerIdentity.Contains("@")) { i = EndpointIdentity.CreateUpnIdentity(expectedServerIdentity); } else { i = EndpointIdentity.CreateSpnIdentity(expectedServerIdentity); } return(new EndpointAddress(new Uri(EventServiceConfiguration.CreateTcpUri(hostname, port)), i)); }
public static string CreateServerBindingUri() { return(EventServiceConfiguration.CreateTcpUri(RegistrySettings.NetTcpBindAddress, RegistrySettings.NetTcpBindPort)); }