?
Solved

WebService timeout

Posted on 2006-11-09
3
Medium Priority
?
426 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1500 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

765 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