WCF客户端挂在响应 [英] WCF client hangs on response

查看:136
本文介绍了WCF客户端挂在响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WCF客户端(Win7上运行)指向的WebSphere服务。

I have a WCF client (running on Win7) pointing to a WebSphere service.

所有这些都是从测试工具很好(有点测试夹具我的web应用程序之外),但是当我到服务电话从我的web项目发起的呼叫中的一个(也是唯一一个)是极其缓慢反序列化(它需要分VS秒)和不只是第一次

All is good from a test harness (a little test fixture outside my web app) but when my calls to the service originate from my web project one of the calls (and only that one) is extremely slow to deserialize (it takes minutes VS seconds) and not just the first time.

我可以从响应回来很快,但随后小提琴手看到的 WCF客户端挂在先下一响应本身超过一分钟行代码被调试器击中,几乎如果客户端遇到了麻烦反序列化。出现这种情况只有在响应我有一个给定的PDF格式的字符串(操作生成PDF格式),base 64编码分块。如果例如服务引发故障(从而pdf的串不存在),那么响应被立即反序列化。

I can see from fiddler that the response comes back quickly but then the WCF client hangs on the response itself for more than a minute before the next line of code is hit by the debugger, almost if the client was having trouble deserializing. This happens only if in the response I have a given pdf string (the operation generates a pdf), base64 encoded chunked. If for example the service raises a fault (thus the pdf string is not there) then the response is deserialized immediately.

再次,如果我通过皂发送完全相同的信封-UI或从网站项目之外的一切都很好。

Again, If I send the exact same envelope through Soap-UI or from outside the web project all is good.

我在亏损 - 我应该怎么找,是有一些配置设置,可能会做的伎俩

I am at loss - What should I be looking for and is there some config setting that might do the trick?

任何帮助表示赞赏。

修改

我编写了一个存根针对相同的服务合同。使用完全相同的basicHttpBinding的并返回完全​​相同的PDF格式的字符串是没有登记的延迟。我想,这排除了串并作为一个可能的原因的结合。剩下的是什么?

I coded a stub against the same service contract. Using the exact same basicHttpBinding and returning the exact same pdf string there is no delay registered. I think this rules out the string and the binding as a possible cause. What's left?

推荐答案

修改 transferMode =缓冲 transferMode =绑定上做了绝招流

因此,有效载荷显然被分块小位大小的缓冲器。

So the payload was apparently being chunked in small bits the size of the buffer.

我想可能已经通过增加缓冲区大小来实现相同的( MAXBUFFERSIZE =1000000),但我有在已经到位,并没有帮助。

I thought the same could have been achieved by increasing the buffersize (maxBufferSize="1000000") but I had that in place already and it did not help.

这篇关于WCF客户端挂在响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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