Re: Detecting a dead proxy to a remote object



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
> >
> >
>
>


.



Relevant Pages

  • Re: Pocket PC flicker
    ... Michael, this is the whole reason they don't want you calling ... > ControlBox ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Cannot start Cluster Resources
    ... Regards ... "Michael P. Schieferer" wrote: ... >> we have a 2-Node Cluster here wich running Exchange, File and DHCP ...
    (microsoft.public.windows.server.clustering)
  • Re: putty and SuSE and OpenSSH2 without password
    ... >>> regards ... >>> Michael ... > in the putty-help it should only be no write permissions for group/other. ... William Hooper ...
    (comp.security.ssh)
  • Re: Chart with Month-Scale, MajorUnitScale
    ... They are TickMarkUnitType, TickMarkSpacing, ... TickLabelUnitType and TickLabelSpacing! ... Regards ... Michael ...
    (microsoft.public.office.developer.web.components)
  • Re: Call click event via code? C#
    ... Cor, Michael; I agree that calling the underlying code directly is ... if multiple methods are subscribing to the event, ...
    (microsoft.public.dotnet.languages.csharp)