0

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 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?


ns12345
  • 3,079
  • 5
  • 41
  • 62

2 Answers2

1

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

Community
  • 1
  • 1
CodingWithSpike
  • 42,906
  • 18
  • 101
  • 138
1

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.

DaveRead
  • 3,371
  • 1
  • 21
  • 24