public CenaPlusServerHost(int port, string serverName) : base(typeof(LocalCenaServer)) { Uri uri = new UriBuilder("net.tcp", "localhost", port, "/CenaPlusServer").Uri; base.AddServiceEndpoint(typeof(ICenaPlusServer), new NetTcpBinding(SecurityMode.None) { MaxReceivedMessageSize = Int32.MaxValue }, uri.ToString()); broadcaster = new ServiceBroadcaster() { ServiceType = typeof(ICenaPlusServer), ServerName = serverName, Port = port }; }