Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否有可配置的设置来限制 WCF 的最大请求/响应数据包大小?我正在使用 VSTS 2008 + WCF 3.5。我是作为 Windows 服务的自托管 WCF 服务。
提前谢谢,乔治
是的,绑定具有获取/设置最大接收数据字节的属性:检查“maxReceivedMessageSize”属性(以字节为单位表示大小)。
但是,将其设置为一个大值并不是一个好主意,因为如果传输中发生错误,您必须重新发送整个(大)消息。
编辑:在这里您可以找到有关所有绑定配置属性的详细信息。