Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7442697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:12:54+00:00 2026-05-29T11:12:54+00:00

In a VS2010 C# project we have a class derived from a MarshalByRefObject and

  • 0

In a VS2010 C# project we have a class derived from a MarshalByRefObject and we use Activator.GetObject to set it. We are using this derived class to talk to a machine across the network.

Sometimes the target machine is on and able to be pinged but it isn’t running the program we want to talk to, this causes a 30 second wait followed by an exception. Is there a way to tell if my derived MarshalByRefObject is valid?

Currently a try/catch is handling this situation, but the 30 second wait is not acceptable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:12:55+00:00Added an answer on May 29, 2026 at 11:12 am

    You could try having a Task call a Ping() method, and use the explicit timeout on the task…

    Task task = new Task(() => { try { obj.Ping(); } catch {} });
    task.Start();
    if(!task.Wait(1000)) throw new TimeoutException();
    // handle other task exceptions etc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Iam using c# vs2010. For my windows forms project I have some PNG,Gif,Jpg images
I have a class library that I created using the Class Library project template.
I'm using VS2010 with Resharper 5.1. I have two projects, a library project (Lib)
I have a ASP.NET MVC2 project in VS2010 that can be deployed in two
I've updated a project to VS2010 and MVC2 from VS2008 and MVC1. I'm having
I'm converting a project from vs2008 to vs2010 and getting linker errors for std:ifstream/ofstream
I'm using VS2010 Beta 2, I have a Complex Type called Address with the
Im using VS2010, C# 4.0, NHibernate and NUnit in a project Im working on..
I have a VS2010 (RTM) solution which contains: WCF Service project Console WCF client
I have a simple class library project (with Class1 ) and have enabled NuGet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.