472,333 Members | 1,127 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 software developers and data experts.

when webservice service is down.

i'm woking with webservice ...

how should the client do when webservice service is down.

what kind of exception would occur..?

when my testing it always wait server's signal...

best regards
Nov 21 '05 #1
1 2298
DotNetMania wrote:
i'm woking with webservice ...
how should the client do when webservice service is down.
what kind of exception would occur..
when my testing it always wait server's signal...

I think all the exceptions will be of class WebException. This class
gives you a bunch of information about just what went wrong, but it
isn't easy to get at it sometimes.

What I do is this:

public static string WebExceptionMessage(WebException ex)
case WebExceptionStatus.ConnectFailure:
return "Unable to connect to the Internet";

case WebExceptionStatus.NameResolutionFailure:
return "Unable to resolve the server's address";

case WebExceptionStatus.Timeout:
return "Timeout waiting for the server to respond"

if (ex.Response is HttpWebResponse)
HttpWebResponse response = (HttpWebResponse) ex.Response;
if (response.StatusCode == HttpStatusCode.NotFound")
return "Web server contacted, but the web service was not found.";
return "Some other error happened";

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: anders | last post by:
I have a 'solution' with a Webservice, Business layer and a data layer. In the Business layer I've added a form that need to be started on the...
by: hazz | last post by:
I don't get it. I have a VS2005 solution with a web service project and a windows project. The web service when tested on its own works fine. But...
by: Sanjay | last post by:
I have written a web service to return information from the database. This works and the data is returned in XML format from the database and...
by: RichardF | last post by:
I have a solution that contains a web service and a web site. I was working on it all day Monday with no problems. Tuesday morning it stopped...
by: ad | last post by:
When we new a web Service, the default in IIS is Allow Anonymous and Integrated Windows Authentication , we just use : WebService.webClass myWC=...
by: GD | last post by:
Hi, I am trying to call a webservice from a windows service application. It works only if I launch the windows service app from VS.Net 2005...
by: JeremyPollack | last post by:
Here's the situation : I have the same ASP.NET 2.0 web application running on both Machine A and Machine B. On both machines, I have Integrated...
by: =?Utf-8?B?cnZhbmdlbGRyb3A=?= | last post by:
Hello, I have a problem with our OnlineBackupService.exe. This is a Windows Service which is built in .Net 1.1 and basically grabs files from the...
by: Anton | last post by:
Hi, when accessing a secured 3rd party webservice i'm getting a 401 HTTP Statuscode (unauthorized). When entering the url in a browser and...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.