title: Test if remoting proxy is valid?
body: <p>I'm using remoting between a client and server, and while it works, I'm seeing some behavior I don't understand.</p>
  
  <p>I'm setting up my server as follows:</p>
  
  <pre><code>        BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider();
          serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;            
          BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider();
  
          IDictionary props = new Hashtable();
          props["name"] = "MarsLogServer.rem";
          props["port"] = Properties.Settings.Default.ListeningPort;
          props["useIpAddress"] = false;
  
          server = new LogServer();
  
          chan = new TcpChannel(props, clientProv, serverProv);
          ChannelServices.RegisterChannel(chan, true);            
          RemotingConfiguration.RegisterWellKnownServiceType(typeof(LogServer), "MarsLogServer.rem", WellKnownObjectMode.Singleton);            
  </code></pre>
  
  <p>And my client is connecting as follows:</p>
  
  <pre><code>this.logServer = (ILogServer)Activator.GetObject(typeof(ILogServer), connectForm.Url);
  this.logServer.AttachClient(this, connectForm.SessionKey)
  </code></pre>
  
  <p>What's happening is I don't even have the server running, but my call to AttachClient() on the proxy my client receives succeeds. I don't understand why that is, there's no process running hosting an object on the provided URL (unless someone is playing a mean trick on me) so why doesn't it throw an exception?</p>
  
  <p>Ideally I'd like the call to fail, or I'd like some way to test that my proxy is valid before allowing my client to proceed. As it is now there's no way of knowing if the connection was successful or not.</p>