在 XmlDictionaryReaderQuotas 对象上设置更高的值(特别是 MaxStringContentLength 和 MaxArrayLength)是否存在任何陷阱?

发布于 2024-10-07 15:51:10 字数 299 浏览 0 评论 0原文

特别值得注意的是,这是针对 BasicHttpBinding 对象上的 ReaderQuotas 属性。具体来说,我可能会遇到(非常)少数情况,我当前的值 163,840,000 (来自以前的开发人员的神奇未记录值,不确定来源)是不够的。然而,我厌倦了在看似很少的边缘情况下进一步提高这个值,尽管它们在生产(付费客户)环境中可能很重要。

我想知道的是,除了明确允许序列化大量数据并沿着管道发送(这是针对 WCF 端点)之外,使用更高的值是否存在任何已知或隐藏的陷阱?如果存在陷阱,它们可能是什么,以及会受到什么影响。

Of special note, this is for the ReaderQuotas property on a BasicHttpBinding object. Specifically, might I have a (very) few situations where my current value of 163,840,000 (magic undocumented value from previous dev, not sure of the source) isn't sufficient. However, I'm weary about raising this value even more for seemingly few edge cases, though they may be important in production (a paying client's) environment.

What I would like to know is, are there any known or hidden pitfalls in using higher values, other than explicitly allowing a large amount of data get serialized and sent down the pipe (this is for a WCF endpoint)? And if there are pitfalls, what might they be, and what would be affected.

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

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

发布评论

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

评论(1

本宫微胖 2024-10-14 15:51:10

我们为一个项目这样做了,除了我们还必须增加或绑定服务器和客户端的超时之外,没有遇到任何问题。然而,后来我们更改了程序,为我们提供有限的数据重新调整,因为该修复表明我的设计选择不佳。

We did this for a project and didn't run into any issue except that we also had to increase or binding timeouts of the server and client. Latter however we changed the program to give us bounded data retuns as the fix was indicative of a poor design choice on my part.

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