Re: Detecting a dead proxy to a remote object
- From: "Michael Groeger" <google.news@xxxxxx>
- Date: Tue, 6 Dec 2005 12:20:52 +0100
Hi Chris,
thanks but I am forced to use framework 1.0 :(
Regards,
Michael
"Chris Yager" <chris.yager@xxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:eD7MrMq9FHA.3360@xxxxxxxxxxxxxxxxxxxxxxx
> You might try using the Ping class (new to .net 2.0 I believe)
>
> You could implement a shared function that performs a ping and call it at
> some interval to determine if the target computer is online. You can
> determine the target computers url through the WellKnownClientType exposed
> through RemotingConfiguration.GetWellKnownClientTypes().
>
> -chris
>
> (Sample from VS-2005 help system)
> using System;
> using System.Net;
> using System.Net.NetworkInformation;
> using System.Text;
>
> namespace Examples.System.Net.NetworkInformation.PingTest
> {
> public class PingExample
> {
> // args[0] can be an IPaddress or host name.
> public static void Main (string[] args)
> {
> Ping pingSender = new Ping ();
> PingOptions options = new PingOptions ();
>
> // Use the default Ttl value which is 128,
> // but change the fragmentation behavior.
> options.DontFragment = true;
>
> // Create a buffer of 32 bytes of data to be transmitted.
> string data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
> byte[] buffer = Encoding.ASCII.GetBytes (data);
> int timeout = 120;
> PingReply reply = pingSender.Send (args[0], timeout, buffer,
> options);
> if (reply.Status == IPStatus.Success)
> {
> Console.WriteLine ("Address: {0}", reply.Address.ToString
> ());
> Console.WriteLine ("RoundTrip time: {0}",
> reply.RoundtripTime);
> Console.WriteLine ("Time to live: {0}",
reply.Options.Ttl);
> Console.WriteLine ("Don't fragment: {0}",
> reply.Options.DontFragment);
> Console.WriteLine ("Buffer size: {0}",
reply.Buffer.Length);
> }
> }
> }
> }
>
>
> "Michael Groeger" <google.news@xxxxxx> wrote in message
> news:%23b8Ko1Z9FHA.808@xxxxxxxxxxxxxxxxxxxxxxx
> > Hi,
> >
> > is there a chance to find out if a proxy to a remote object is dead
> > without
> > calling a method on the proxy? I have written a frontend for a service,
> > the
> > service itself is the remote object. Now when calling
> > Activator.GetObject()
> > I get a TransparentProxy created even if the service is not started. Any
> > ideas?
> >
> > Regards,
> > Michael
> >
> >
>
>
.
- Follow-Ups:
- Re: Detecting a dead proxy to a remote object
- From: Goran Sliskovic
- Re: Detecting a dead proxy to a remote object
- References:
- Detecting a dead proxy to a remote object
- From: Michael Groeger
- Re: Detecting a dead proxy to a remote object
- From: Chris Yager
- Detecting a dead proxy to a remote object
- Prev by Date: Re: How may I keep a reference to a delegate
- Next by Date: Re: Detecting a dead proxy to a remote object
- Previous by thread: Re: Detecting a dead proxy to a remote object
- Next by thread: Re: Detecting a dead proxy to a remote object
- Index(es):
Relevant Pages
|