Solved

WebService timeout

Posted on 2006-11-09
3
421 Views
Last Modified: 2008-02-07
Hi,

I m using the time out feature of Webservice request,  and i want to catch this timeout exception by a specific class, not by system.net.webexception class, i tried to look if theres  any specific timeoutexception class for web service request,  but didnt find any yet.  

The reason is that i need to display custom timeout messages when time out occurs, not just   exception  message through e.Message.

Can someone help me with this.
0
Comment
Question by:jyotishb
  • 3
3 Comments
 
LVL 15

Expert Comment

by:ozymandias
ID: 17910108
What verions of .net are you using.
Can you show some code of how you are using the timeout ?
0
 
LVL 15

Expert Comment

by:ozymandias
ID: 17910309
Can you not just catch the System.Net.WebException and then throw a timeout exception class of your own if the webexception message is "The operation has timed-out.".
0
 
LVL 15

Accepted Solution

by:
ozymandias earned 500 total points
ID: 17910457
Actually, there is a special kind of WebException for Timeout but its not another class.

Look at the WebException.Status property, if it is WebExceptionStatus.Timeout then you know you have a timeout.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question