title: .NET Remoting: how to access server application objects from remotable object?
body: <p>I'm writing a windows service application, which will be accessed through .NET Remoting.
  The problem is I can't figure out how to access service objects from remotable class.</p>
  
  <p>For example, I've a handler class:</p>
  
  <pre><code>class Service_console_handler
     {
      public int something_more = 20;
  
      //some code...
  
              TcpChannel serverChannel = new TcpChannel(9090);
              ChannelServices.RegisterChannel(serverChannel);
              RemotingConfiguration.RegisterWellKnownServiceType(
                          typeof(RemoteObject), "RemoteObject.rem", 
                          WellKnownObjectMode.Singleton);
  
      //from here on RemoteObject is accessible by clients.
      //some more code doing something and preparing the data...
     }
  </code></pre>
  
  <p>And I've a remotable class:</p>
  
  <pre><code>public class RemoteObject : MarshalByRefObject
  {
      private int something = 10;
  
      public int Get_something()
      {
          return something;
      }
  }
  </code></pre>
  
  <p>Clients can access data in RemoteObect with no problem. But how can I access <code>Service_console_handler</code> object (i.e. to retrieve useful info from <code>something_more</code>)?</p>
  
  <p>Sorry for dumb questions and thanks in advance.</p>