<div dir="ltr">Do you have a simple reproduction that doesn&#39;t include any of your domain-specific code?<br><br>
<div class="gmail_quote">On Tue, Sep 2, 2008 at 4:30 PM, Leo Carbajal <span dir="ltr">&lt;<a href="mailto:desleo@gmail.com">desleo@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div dir="ltr">So here&#39;s a strange wrinkle,<br><br>when I run this with the debugger (unmodified except for adding the IronPython assemblies as full-trust on the domain) it works fine and as expected. If I run it without the debugger attached it gives me the same exception as before, when I catch the exception myself I also get this tidbit:<br>
<br>The assembly or AppDomain that failed was:<br>Microsoft.Scripting, Version=1.0.0.4000, Culture=neutral, PublicKeyToken=31bf3856ad364e35<br>The Zone of the assembly that failed was:<br>MyComputer<br>The Url of the assembly that failed was:<br>
file:///B:/Code/IronPythonShell/IronPythonShell/bin/Debug/Microsoft.Scripting.DLL<br><br>If I build and compile the code as Release instead of Debug I get: <br><br>System.Runtime.Serialization.SerializationException: Type &#39;System.Scripting.SourceUnit&#39; in assembly &#39;Microsoft.Scripting.Core, Version=1.0.0.4000, Culture=neutral, PublicKeyToken=31bf3856ad364e35&#39; is not marked as serializable. 
<div class="Ih2E3d"><br>&nbsp;&nbsp; at Microsoft.Scripting.Hosting.ScriptRuntime.ExecuteFile(String path)<br></div>&nbsp;&nbsp; at IronPythonShell.Program.Main(String[] args) in B:\Code\IronPythonShell\IronPythonShell\Program.cs:line 54<br>
<br>It&#39;s a little beyond odd to me, but like I said before I fear I don&#39;t fully understand what&#39;s going on behind the goo. The only consolation is that I can at least built out my scripting system in working form and later run it under a more trusted domain for production by simply removing the domain from the Runtime.Create() constructor and then adding it later. (At least, I hope this is the case)<br>
<br>---<br>Leo C. 
<div class="Ih2E3d"><br><br>
<div class="gmail_quote">On Tue, Sep 2, 2008 at 4:50 PM, Shri Borde <span dir="ltr">&lt;<a target="_blank" href="mailto:Shri.Borde@microsoft.com">Shri.Borde@microsoft.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><span style="COLOR: rgb(31,73,125); FONT-SIZE: 11pt">The CLR doesn&#39;t dump out full exception information on SecurityExceptions in partial trust – you can get a lot more information if you look at the exception in a debugger, or if you Assert for FullTrust before doing a ToString on the permission.&nbsp; Once you do that, you should be able to get more data including the demanded permission and the assembly which caused the demand to fail, instead of the message saying &quot;</span><span style="COLOR: rgb(102,102,102)">The granted set of the failing assembly was:</span><span style="COLOR: rgb(31,73,125); FONT-SIZE: 11pt">&quot; which does not say which assembly is causing the problem.</span></p>

<p><span style="COLOR: rgb(31,73,125); FONT-SIZE: 11pt">&nbsp;</span></p>
<p><span style="COLOR: rgb(31,73,125); FONT-SIZE: 11pt">Also, can you try adding IronPython.dll and IronPython.Modules.dll to the </span><span><span style="COLOR: black; FONT-SIZE: 8pt">fullTrustAssemblies</span></span><span style="COLOR: rgb(31,73,125); FONT-SIZE: 11pt"> argument to <a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms130766.aspx">AppDomain.CreateDomain</a>?</span></p>

<p><span style="COLOR: rgb(31,73,125); FONT-SIZE: 11pt">&nbsp;</span></p>
<p><span style="COLOR: rgb(31,73,125); FONT-SIZE: 11pt">Thanks,</span></p>
<p><span style="COLOR: rgb(31,73,125); FONT-SIZE: 11pt">Shri</span></p>
<p><span style="COLOR: rgb(31,73,125); FONT-SIZE: 11pt">&nbsp;</span></p></div></div></blockquote></div><br></div></div><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a target="_blank" href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br><br></blockquote></div><br></div>