wcf最大邮件大小 [英] wcf max message size

查看:73
本文介绍了wcf最大邮件大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,这里有一个WCF问题:

hey guys, a WCF question for you here:

我有两个服务,并且正在它们之间发送相当大的消息(〜100kb).尽管前面提到的值是消息大小的典型值,但它可能会大幅度波动(正向和负向).

i have two services and am sending pretty chunky messages between them (~100kb). Though the previously mentioned value is typical of the size of the message, it is possible for it to fluctuate greatly (in both positive and negative directions).

因此,为了应对这样的情况,即我必须传输膨胀的消息,我在客户端和服务器端都在app.config中提高了所有最大消息大小,最大字符串大小等属性(正确设置了相关端点)引用说明尺寸的绑定)

Thus, to deal with such situations where i have to transport a swollen message i have cranked up all the max message size, max string size etc attributes in the app.config on both client and server end (with the relevant endpoint correctly referencing the binding which states the sizes)

为了安全起见,我输入的限制完全超出了任何可能的消息大小.但是,在服务间通信在消息大小范围的较低端被证明是可靠的情况下,在较高端则不是这样-消息似乎根本没有传递.

The bound i have put in completely exceeds any possible message size for safety's sake. However, where the inter-service communication has proved reliable at the lower end of the message size scale, at the higher end this is not so - messages do not seem to be delivered at all.

最奇怪的是,如果消息超出了最大大小,则将引发异常(我已经遇到足够多的异常了!),但什么也不会引发-全部完全无声地路过.我已经尝试了各种大小的消息,并且它肯定只是随着消息大小的增长才开始发生.我可以证明目标服务没有收到该消息,因为接收到该服务后,该服务会在DB中进行日志记录-但是对于大消息,不会进行日志记录.

the strangest thing is that if the message had exceeded max size then an exception would be thrown (i've encountered enough of these to know this! lol), but nothing gets thrown - it all passes by completely silently. I have experimented with various sizes of messages and it definitely only begins to happen as the message size grows. I can prove are not being received by the destination service as, upon reception, the service makes a log in a DB - but with big messages, no log is made.

正如我所说,我几乎可以肯定,我已经增加了app.config中所有适用属性的大小,因此完全完全为这种行为所困扰!

as i said, i am almost certain i have increased the size of all applicable attributes in the app.config, and so am completely and utterly baffled by this behaviour!

关于什么可能导致这种神秘行为的任何建议?任何帮助将非常,因为这是我项目的最后障碍!谢谢:-)

any suggestions on what could be causing such mystifying behaviour? any help would be much appreciated as this is the final hurdle in my project! thanks :-)

推荐答案

抱歉,在进一步拖网之后,我发现了错误的根源!数据契约中的一个类已更改([DataContract]属性已删除,但奇怪的是[DataMemeber]留在了相关属性上!非常奇怪!)

sorry guys, after further trawling i discovered the source of the error! one of the classes in the datacontract had been changed (the [DataContract] attribute had been removed, but strangely [DataMemeber] had been left on the relevant properties! very odd!)

无论如何,感谢您的所有帮助,特别是rfor让我到了这一点,在这里我终于可以洗这个烂项目的手了:-)

thanks for all your help anyways, especially rfor getting me to this point, where i can finally wash my hands of this damn project :-)

这篇关于wcf最大邮件大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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