开发者

WCF web service config ReceiveTimeout

the Binding > ReceiveTimeout is not set in my config, and the application crashes I guess after the default value.

How can I set it to no limit? and why do I need timeouts on the first place. I want my application to run forever without crashing开发者_JAVA技巧 because of timeouts.

And pointers to learn all about web service configurations, I find them confusing and have no grasp over it. I always google and then there's hit and trial. Any books, articles, tutorials?



The default timeout for a client is 60 seconds, at which time it will throw an exception. Really, you should try/catch the exception and do something to handle a timeout, not wait forever. You can increase the timeout in your binding configuration. See here:

Increasing the timeout value in a WCF service

Also here, scroll down to the "sendTimeout" element:

http://msdn.microsoft.com/en-us/library/ms731361.aspx


Alternatively, look at using asynchronous operations if you have a long-running call, as you don't want the call to block while it waits for a response from the server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜