开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜