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

posted on 2011-07-06 18:32  hl3292  阅读(367)  评论(0编辑  收藏  举报