title: Problem with .Net Remoting (C#)
body: <p>I am using .Net Remoting and trying to access a remote object modified in the Server, here is the object def:
  The idea is that the MRB object, which I create on the server,  is returned to the client and "Set On Server" is printed out when getString() is called on the client.</p>
  
  <p>What I get right now is a null string on the client, so the MRB object was not send to the client when new was called on the client.
  Sorry for all the different classes etc, but its the only way, I trimmed as much as possible.</p>
  
  <p>What I really want is for "<strong>Set On The Server"</strong> printed on the client when run.</p>
  
  <pre><code>using System;
  using System.Runtime.Remoting.Lifetime;
  namespace RemoteType
  {
      public class MyRemoteObject : System.MarshalByRefObject
      {
          private string sharedString;
          public string getString()
          {
              return sharedString;
          }
          public void setString(string value)
          {
          sharedString = value;
          }   
          public MyRemoteObject()
          {
              Console.WriteLine("MyRemoteObject Constructor Called");
          }
  
          public override object InitializeLifetimeService()
          {
              return null;
          }
          public string Hello()
          {
              return "Hello, Welcome to .Net Remoting !";
          }
      }
  </code></pre>
  
  <p>Know here is the server:</p>
  
  <pre><code>using System;
  using System.Runtime.Remoting;
  using RemoteType;
  namespace SimpleServer
  {
      class SimpleServer
      {
          public static MyRemoteObject MRB = null;
          static void Main(string[] args)
          {
              RemotingConfiguration.Configure("RemotingAppServer.exe.config");
              MRB = new MyRemoteObject();
              MRB.setString("Set on the server");
              Console.WriteLine(MRB.getString());
              RemotingServices.Marshal((MRB), "MyRemoteObject");
              Console.WriteLine("Press return to exit");
              Console.ReadLine();
          }
      }
  </code></pre>
  
  <p>And the .NET Remote Config App.Config:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
      &lt;system.runtime.remoting&gt;
          &lt;application&gt;
              &lt;channels&gt;
                  &lt;channel ref="tcp" port="8000" /&gt;
              &lt;/channels&gt;
              &lt;service&gt;
                  &lt;wellknown mode="Singleton" 
                  type="RemoteType.MyRemoteObject, RemoteType"
                  objectUri="MyRemoteObject" /&gt;
              &lt;/service&gt;
          &lt;/application&gt;
      &lt;/system.runtime.remoting&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Finally the client:</p>
  
  <pre><code>using System;
  using System.Runtime.Remoting;
  using RemoteType;
  namespace SimpleClient
  {
      class SimpleClient
      {
          static void Main(string[] args)
          {
              RemotingConfiguration.Configure("RemoteClient.exe.config");
              MyRemoteObject robj = new MyRemoteObject();
              Console.WriteLine(robj.Hello() + " " + robj.getString());
              Console.ReadLine();
          }
      }
  }
  </code></pre>
  
  <p>And its config too:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
      &lt;system.runtime.remoting&gt;
          &lt;application name = "SimpleClient"&gt;
              &lt;client&gt;
                  &lt;wellknown
                  type="RemoteType.MyRemoteObject,RemoteType"
                  url="tcp://localhost:8000/MyRemoteObject"/&gt;
              &lt;/client&gt;
              &lt;channels&gt;
                  &lt;channel ref="tcp" port="0"/&gt;
              &lt;/channels&gt;
          &lt;/application&gt;
      &lt;/system.runtime.remoting&gt;
  &lt;/configuration&gt;
  </code></pre>