title: Problems with .NET Remoting TransparentProxy
body: <p>I'm trying to execute some code in AppDomain using Reflection.
  Here is my code:</p>
  
  <pre><code>AppDomain appDomain = GetSomehowAppDomain(); 
  string typeAssembly = GetTypeAssembly();
  string typeName = GetTypeName();
  object targetObject = appDomain.CreateInstanceAndUnwrap(typeAssembly, typeName);
  MethodInfo methodInfo = targetObject.GetType().GetMethod(methodName);
  object result = methodInfo.Invoke(targetObject, methodParams);
  </code></pre>
  
  <p>When this code is running under web site everything is OK. 
  But when I'm doing this from console application which calls WCF service which tries to call the above code - <code>methodInfo</code> is <code>null</code> and I'm getting <code>NullReferenceException</code> at last line.</p>
  
  <p>By the way <code>targetObject</code> is of <code>System.Runtime.Remoting.Proxies.__TransparentProxy</code> type and I assumed that if it proxy in GoF pattern meaning I can access members of type which is original source for proxing. But <code>targetObject</code> doesn't have members of <code>typeName</code> type.</p>
  
  <p>Using <code>targetObject.GetType().GetMethods()</code> I've found out that it has 7 methods:</p>
  
  <ol>
  <li>GetLifetimeService</li>
  <li>InitializeLifetimeService</li>
  <li>CreateObjRef</li>
  <li>ToString</li>
  <li>Equals</li>
  <li>GetHashCode</li>
  <li>GetType</li>
  </ol>
  
  <p><code>targetObject</code> is expected to be a proxy for <code>WorkflowManager</code> type.</p>
  
  <p><code>public class WorkflowsManager : MarshalByRefObject, ISerializable, IDisposable, IWorkflowManager</code></p>