Hi Dino,<br><br>If have tweaked your code to reproduce the exception that I am facing. Let me know if you need more details.<br><br>thanks,<br>Mustaq<br><br>using System;<br>using Microsoft.Scripting;<br>using IronPython.Hosting;<br>
using Microsoft.Scripting.Hosting;<br><br>class Foo<br>{<br>    public static void Main(string[] args)<br>    {<br>        AppDomain ad = AppDomain.CreateDomain(&quot;foo&quot;);<br>        var engine = Python.CreateEngine(ad);<br>
        engine.Runtime.LoadAssembly(typeof(MbrBase).Assembly);<br><br>        var code = engine.CreateScriptSourceFromString(@&quot;<br>import MbrBase<br>class C(MbrBase):<br>    pass<br><br>a = C()<br>&quot;, SourceCodeKind.Statements);<br>
<br>        var scope = engine.CreateScope();<br>        code.Execute(scope);<br><br>        Console.WriteLine(&quot;Trying to do it... {0}&quot;, <a href="http://AppDomain.CurrentDomain.Id">AppDomain.CurrentDomain.Id</a>);<br>
        MbrBase mbr = (MbrBase)scope.GetVariable(&quot;a&quot;);<br><br>//     MY CHANGES<br><br>        string isSubClassCode = String.Format(&quot;issubclass({0},{1})&quot;, &quot;C&quot;, &quot;MbrBase&quot;);<br>        ScriptSource script = engine.CreateScriptSourceFromString(isSubClassCode, SourceCodeKind.Expression);<br>
        bool result = (bool)script.Execute(scope);<br><br>        if (result == true)<br>        {<br>            ObjectOperations ops = engine.Operations;<br><br>            object subClass = scope.GetVariable(&quot;C&quot;);<br>
            object instance = ops.Call(subClass);<br><br>            mbr = instance as MbrBase; <br>        }<br><br>//      END OF MY CHANGE<br>       <br>        mbr.DoItVirtually();<br>        mbr.DoIt();<br>        Console.ReadKey();<br>
    }<br>}<br><br>public class MbrBase : MarshalByRefObject<br>{<br>    public virtual void DoItVirtually()<br>    {<br>        Console.WriteLine(&quot;Did it virtually {0}&quot;, <a href="http://AppDomain.CurrentDomain.Id">AppDomain.CurrentDomain.Id</a>);<br>
    }<br>    <br>    public void DoIt()<br>    {<br>        Console.WriteLine(&quot;Did it {0}&quot;, <a href="http://AppDomain.CurrentDomain.Id">AppDomain.CurrentDomain.Id</a>);<br>    }<br>}<br>