监听端口

   public static GISWCFClient GetGISWCFClient()
        {
            EndpointAddress endpointAddress = new EndpointAddress("net.tcp://localhost:4505/GISWCF/CY.EMP.EMPWebBLL.PMC.GIS.GISWCF");
            TcpTransportBindingElement bindingElement = new TcpTransportBindingElement();
            bindingElement.MaxReceivedMessageSize = 2147483647;
            bindingElement.MaxBufferSize = 2147483647;
            //bindingElement.MaxBufferPoolSize = 2147483647;
            CustomBinding customBinding = new CustomBinding(bindingElement);
            customBinding.SendTimeout = new TimeSpan(0, 60, 0);
            customBinding.ReceiveTimeout = new TimeSpan(0, 60, 0);
            customBinding.CloseTimeout = new TimeSpan(0, 60, 0);
            GISWCFClient client = new GISWCFClient(customBinding, endpointAddress);
            return client;
        }

此处一定要用:

拷贝的net.tcp://localhost:4505/GISWCF/CY.EMP.EMPWebBLL.PMC.GIS.GISWCF

原文地址:https://www.cnblogs.com/hl3292/p/2099470.html