Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wcf binding receiveTimeout

I have receiveTimeout in web config of wcf webservice, set to infinite. It doesn't work though, it takes the default value of 10 minutes. and the application crashes after that.

How and where can I catch this crash? and how to put a ping or reconnect again code there.

Or if is there a way to increase receivetimeout to infinite?

like image 1000
ns12345 Avatar asked Feb 20 '26 23:02

ns12345


2 Answers

If you're setting the value in your config file then it's like this:

receiveTimeout="00:30:00"

I don't think it's a good idea to set it to the maximum value though. Try to set it to something reasonable.

If you really want infinite, enable reliable sessions on your binding.

like image 72
BrandonZeider Avatar answered Feb 22 '26 17:02

BrandonZeider


You cannot set the Binding.ReceiveTimeout property to infinite. The maximum value you can set it to is TimeSpan.MaxValue that is slightly more than 10,675,199 days.

like image 43
Sergio Vicente Avatar answered Feb 22 '26 16:02

Sergio Vicente



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!