WCF Windows Service TimeOut [英] WCF Windows Service TimeOut

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

问题描述

我有一个客户端应用程序开发.net seding请求wcf服务,应该发送回复.if执行时​​间在1分钟内,没有错误,如果它超过
1分钟,错误是


内部异常:此请求操作发送到net.tcp:// localhost:18001 / PitToPort / 2008/01/30 / StockpileService / tcp在配置的超时(00:01:00)内没有收到回复。

分配给此操作的时间可能是较长超时的一部分。这可能是因为服务仍在处理操作,或者因为服务无法发送回复消息。请考虑增加操作超时(通过将channel / proxy设置为IContextChannel并设置OperationTimeout属性),并确保该服务能够连接到客户端


如何增加超时和如何?什么是最好的解决方案?

解决方案

我已经将以下代码添加到服务应用程序代码

  system.transactions 
defaultSettings timeout =00:30:00

使用此代码,服务将等待30分钟,以便在数据库服务器
中完成流程,并增加

  maxBufferSize =2147483647
maxReceivedMessageSize =2147483647
maxBufferPoolSize =2147483647

在客户端绑定属性中,然后它工作正常。



问题:服务正在发送响应,但客户端缓冲区较少,我增加到最大缓冲区大小。


I have a client application developed in .net seding a request to wcf service and supposed to send reponse .if execution time with in 1 minute,there is no error,if it exceeds 1 minute the error is

Inner exception: This request operation sent to net.tcp://localhost:18001/PitToPort/2008/01/30/StockpileService/tcp did not receive a reply within the configured timeout (00:01:00).
The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client

How to increase the time out and how? What is the best solution?

解决方案

I have add the following code to the Service app code

system.transactions  
    defaultSettings timeout="00:30:00" 

with this code the service will wait 30 minutes to get process done in database server and increase the

maxBufferSize="2147483647"  
maxReceivedMessageSize="2147483647"  
maxBufferPoolSize="2147483647" 

in client binding attributes, then it works fine.

Problem :Service is sending response but the client buffersize was less previously,I increased to maximum buffer size.

这篇关于WCF Windows Service TimeOut的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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