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

Discussion in 'ASP .Net Web Services' started by Philip K, Jun 28, 2007.

  1. Philip K

    Philip K Guest

    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)
    }
    }
     
    Philip K, Jun 28, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Averstegge
    Replies:
    0
    Views:
    4,329
    Michael Averstegge
    Jan 10, 2006
  2. =?Utf-8?B?aVRoaW5rRGF0YQ==?=

    HOWTO: Configure .Net 2.0 Website, SQLServer 2005, Reporting Servi

    =?Utf-8?B?aVRoaW5rRGF0YQ==?=, Jun 20, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,024
    Smokey Grindle
    Jun 20, 2006
  3. Phil Aldis
    Replies:
    3
    Views:
    224
    Raterus
    Aug 16, 2004
  4. Ani Kinare
    Replies:
    0
    Views:
    291
    Ani Kinare
    May 26, 2005
  5. Jason

    Using DNS name verses Machine Name causes 403 error

    Jason, Sep 13, 2006, in forum: ASP .Net Web Services
    Replies:
    5
    Views:
    321
    Steven Cheng[MSFT]
    Sep 18, 2006
Loading...

Share This Page