public RecorderTunerServiceHost(Type serviceType, int tcpPort)
: base(serviceType, GetServiceUri(tcpPort))
{
XmlDictionaryReaderQuotas quotas = new XmlDictionaryReaderQuotas()
{
MaxStringContentLength = int.MaxValue,
MaxDepth = int.MaxValue,
MaxArrayLength = int.MaxValue,
MaxNameTableCharCount = int.MaxValue,
MaxBytesPerRead = int.MaxValue
};
NetTcpBinding binding = new NetTcpBinding(SecurityMode.None);
binding.ReceiveTimeout = new TimeSpan(0, 30, 0);
binding.SendTimeout = new TimeSpan(0, 30, 0);
binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.None;
binding.Security.Transport.ProtectionLevel = ProtectionLevel.None;
binding.Security.Message.ClientCredentialType = MessageCredentialType.None;
binding.MaxReceivedMessageSize = 256 * 1024 * 1024;
binding.ReaderQuotas = quotas;
binding.Namespace = "http://www.argus-tv.com";
this.AddServiceEndpoint(typeof(IRecorderTunerService), binding, "RecorderTunerService");
}