Reputation: 3743
I'm working on an asp.net application which communicates with web services. However quite often of late, the services have been down. I don't want to throw a generic Exception but rather a very specific one. What is the Exception name that handles 'connection timed out'. Thank you!
Upvotes: 1
Views: 870
Reputation: 21880
The correct one to throw is TimeoutException. The default message is The operation has timed-out
From MSDN:
The exception that is thrown when the time allotted for a process or operation has expired.
Upvotes: 3