What kind of exception is 'Connection Timed Out' - ASP.NET
I'm w开发者_JAVA技巧orking 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!
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.
精彩评论