WCF请求/响应包大小

发布于 2024-07-25 06:16:02 字数 122 浏览 6 评论 0原文

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

提前致谢, 乔治

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.

thanks in advance,
George

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南冥有猫 2024-08-01 06:16:02

是的,绑定具有获取/设置最大接收数据字节的属性:检查“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.

Edit: Here you can find details about all binding configuration properties.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文