WCF 请求/响应包大小 [英] WCF request/response package size

查看:24
本文介绍了WCF 请求/响应包大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可配置的设置来限制 WCF 的最大请求/响应数据包大小?我正在使用 VSTS 2008 + WCF 3.5.我是作为 Windows 服务的自托管 WCF 服务.

I am wondering if there are configurable settings for restriction of the maximum request/respose data package size for WCF? I am using VSTS 2008 + WCF 3.5. I am self-host WCF service as a Windows Service.

提前致谢,乔治

推荐答案

是的,绑定 具有获取/设置最大接收数据字节的属性:检查maxReceivedMessageSize"属性(以字节为单位表示大小)).

Yes, the binding has properties for getting/setting max receive data bytes: check "maxReceivedMessageSize" property (representing the size in bytes).

但是,将其设置为大值并不是一个好主意,因为如果传输中发生错误,您必须重新发送整个(大)消息.

However, setting this to a big value could not be a good idea since if an error occures in the transport you have to resend the whole (big) message.

此处您可以找到有关所有绑定配置的详细信息特性.

Here you can find details about all binding configuration properties.

这篇关于WCF 请求/响应包大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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