在 XmlDictionaryReaderQuotas 对象上设置更高的值(特别是 MaxStringContentLength 和 MaxArrayLength)是否存在任何陷阱?
特别值得注意的是,这是针对 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们为一个项目这样做了,除了我们还必须增加或绑定服务器和客户端的超时之外,没有遇到任何问题。然而,后来我们更改了程序,为我们提供有限的数据重新调整,因为该修复表明我的设计选择不佳。
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.