开发者

WCF service connection closing when trying load more records

I use WCF service to connect WPF front-end application with ERP back-end database.

I get an WCF service error: "The connection was closed unexpectedly" in my WPF application when trying to load table with many records (about 1000)开发者_运维问答. Everything is going fine on tables with 10 - 20 records.

In my settings of the WCF service I have nothing conserning TimeOut settings. Maybe there are some timeout settings by default. How I can change this?

This is code with settings of my WCF service:

public void Start()
    {
        BasicHttpBinding binding = new BasicHttpBinding();
        binding.Name = "NAVBinding";
        binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
        Uri baseAddress = new Uri("http://localhost:8000/nav/customer");
        Customer_Service service = new Customer_Service();
        serviceHost = new ServiceHost(service, baseAddress);
        serviceHost.AddServiceEndpoint(typeof(ICustomer_Service), binding, baseAddress);
        OpenMetadataExchange(baseAddress);
        service.navEventListner = this;
        serviceHost.Open();
    }


The problem is likely that the response is exceeding either the MaxReceivedMessageSize property of the client binding or the reader quotas.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜