static Service() { RemoteIP = string.Empty; BasicHttpBinding basicHttpBinding = new BasicHttpBinding(); basicHttpBinding.Name = "BindingName"; basicHttpBinding.set_MaxBufferSize(int.MaxValue); basicHttpBinding.set_MaxReceivedMessageSize(2147483647L); basicHttpBinding.set_MaxBufferPoolSize(2147483647L); basicHttpBinding.CloseTimeout = TimeSpan.FromMinutes(30.0); basicHttpBinding.OpenTimeout = TimeSpan.FromMinutes(30.0); basicHttpBinding.ReceiveTimeout = TimeSpan.FromMinutes(30.0); basicHttpBinding.SendTimeout = TimeSpan.FromMinutes(30.0); basicHttpBinding.set_TransferMode(TransferMode.Buffered); basicHttpBinding.set_UseDefaultWebProxy(false); basicHttpBinding.set_ProxyAddress((Uri)null); basicHttpBinding.set_ReaderQuotas(new XmlDictionaryReaderQuotas { MaxDepth = 2000000, MaxArrayLength = int.MaxValue, MaxBytesPerRead = int.MaxValue, MaxNameTableCharCount = int.MaxValue, MaxStringContentLength = int.MaxValue }); basicHttpBinding.Security = new BasicHttpSecurity { Mode = BasicHttpSecurityMode.None }; binding = basicHttpBinding; ServicePointManager.ServerCertificateValidationCallback = AcceptAllCertifications; }