Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Using Remoting how to tell server is down verses error doing servi

Reply
Thread Tools

Using Remoting how to tell server is down verses error doing servi

 
 
Philip K
Guest
Posts: n/a
 
      06-28-2007
I am using .NET Framework v2.0 and using a singleton object.

I am using some thing like:

//
// Connect/reconnect by creating object at server and getting proxy
//
if(!commsOK)
{
if(timeToRetryComms)
{
MyRemotingObject myRemotingObject = new MyRemotingObject();
myRemotingObject =
(IMyRemotingObject) Activator.GetObject(
typeof(IMyRemotingObject), url);
commsOK = (myRemotingObject != null);
}
}

//
// If the object is still communicating use it - mark comms down if com fails
//
if(commsOK)
{
try
{
myRemotingObject.DoOperation(a,b,c);
}
catch(WebException)
{
commsOk = false;
}
catch(RemotingTimeoutException)
{
commsOk = false;
}
catch(Exception ex) // comms still assumed to be OK
{
TellUserWhatTheErrorIsSoHeCanFixIt(ex); // i.e. File I/O error at
server
// errors like (user gave wrong directory path or such)
}
}


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
HELP: ASP.NET AJAX Page Continuously Getting Values from Web Servi lmttag ASP .Net Web Services 0 02-05-2009 06:24 PM
HOWTO: Configure .Net 2.0 Website, SQLServer 2005, Reporting Servi =?Utf-8?B?aVRoaW5rRGF0YQ==?= ASP .Net 1 06-20-2006 06:04 PM
Use Client Certificate from Pocket PC VB.Net app to call Web Servi Ani Kinare ASP .Net Web Services 0 05-26-2005 05:24 PM
Impersonation and integrated security (+sql server reporting servi Phil Aldis ASP .Net Security 3 08-16-2004 08:45 PM



Advertisments