[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

WebService timeout

Posted on 2006-11-09
3
Medium Priority
?
427 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

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…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

656 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