如何增加WCF缓冲区大小服务 [英] How to Increse WCF Buffer Size Services

查看:96
本文介绍了如何增加WCF缓冲区大小服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我尝试发送List< object>数据(80列,100行数据)作为WCF服务的参数.我收到错误消息,远程服务器返回错误.

如果我发送一行,它可以正常工作,但超过10行,我会收到错误消息
错误为远程服务器返回错误".

Hi,

I try to send the List<object> Data(80 columns,100 rows of Data) as parameter to WCF service.I am getting the ERROR the remote server returned an error.

If i send one row,it work fine but more than 10 rows i get the error
The ERROR IS "the remote server returned an error"

推荐答案



很好,您可以做所有Arun和其他人提到的事情.

但是我建议您回顾一下您的设计(是否真的需要那么多数据?),因为它在cpu处理时间和网络延迟方面增加了很多压力.

除此之外,我还想检查一下这是什么类型的数据.这个问题背后的原因-如果它是图像/音频,那么我们可以考虑通过Mtom编码进行流式传输-这对于服务器的健康状况确实非常有用.

希望对您有所帮助!.

问候,
-Vinayak
Hi,

Very well you can do all those things which are mentioned by Arun and others.

But i would recommend you to look back to your design(Is it really needed that much amount of data?) because it adds lot of pressure in terms of cpu processing time and network latency.

In addition to this, i would also want to check what type of data is this. reason behind this question - if it is of image/audio then we can think of Streaming over Mtom encoding - which will be really good for the server health.

I hope this helps!.

Regards,
-Vinayak


您可以在客户端和服务器配置中增加maxReceivedMessageSize.

wcf-how-to-increase-message-size-quota [ ^ ]
You can increase maxReceivedMessageSize in both client and server configuration.

wcf-how-to-increase-message-size-quota[^]


这是我的ServiceReferences.ClientConfig代码,在哪里可以更改?
用于增加缓冲区...


This is my ServiceReferences.ClientConfig code where can i change?
for increase the buffer...


<configuration>
    <system.serviceModel>
        <bindings>
            <customBinding>
                <binding name="CustomBinding_Service" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="10:00:00">
                    <binaryMessageEncoding />
                    <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"  />
                </binding>


            </customBinding>



        </bindings>
        <client>
            <endpoint address="http://localhost:3959/SilverlightApplication2.Web/Service.svc"

                binding="customBinding" bindingConfiguration="CustomBinding_Service"

                contract="ServiceReference1.Service" name="CustomBinding_Service" />
        </client>
    </system.serviceModel>
</configuration>


这篇关于如何增加WCF缓冲区大小服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆