[IronPython] SecurityException while running ipy.exe

Haibo Luo haiboluo at exchange.microsoft.com
Tue Dec 5 17:48:55 CET 2006


"Caspol -resolveperm" shows what kind of permission set was granted to the specified assembly. From the attached result, seems you were running ipy.exe from an intranet share, and ipy.exe/ironpython.dll were granted with a limited set of permissions. (The exception you got below is due to failure at demanding  ControlEvidence permission, which was a pretty high permission, and not granted)

Running ironpython in such (partial trust) scenario is not supported in .net 2.0. Please try to run them from "local disk".

Thanks!

-----Original Message-----
From: Mike Hostetler [mailto:hostetlerm at gmail.com]
Sent: Tuesday, December 05, 2006 5:48 AM
To: Discussion of IronPython; Haibo Luo
Subject: Re: [IronPython] SecurityException while running ipy.exe

Attached is the results of the following commands.  I'm not familiar with caspol, so I don't quite know what you are looking for so I will send the whole thing.

Thanks for the help!
Mike

On 12/4/06, Haibo Luo <haiboluo at exchange.microsoft.com> wrote:
> Can you show which permission set is granted to your ipy.exe/ironpython.dll?
>
> caspol -resolveperm ipy.exe
> caspol -resolveperm IronPython.dll
>
>
> -----Original Message-----
> From: users-bounces at lists.ironpython.com
> [mailto:users-bounces at lists.ironpython.com] On Behalf Of Mike
> Hostetler
> Sent: Monday, December 04, 2006 12:47 PM
> To: users at lists.ironpython.com
> Subject: [IronPython] SecurityException while running ipy.exe
>
> I have a machine that has .NET 2.0.50727 installed and I put the
> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 directory in my path.
> The bad news is that I don't have admin nor Power Users privileges on
> this machine.
>
> I unzipped IronPython-1.0.1 and when I run ipy.exe I get the following:
>
> Unhandled Exception: System.Security.SecurityException: Request for
> the permissi on of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.
> 0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
>    at System.Security.CodeAccessSecurityEngine.Check(Object demand,
> StackCrawlMa rk& stackMark, Boolean isPermSet)
>    at System.Security.CodeAccessPermission.Demand()
>    at System.Reflection.Emit.DynamicMethod.PerformSecurityCheck(Module
> m, StackC rawlMark& stackMark, Boolean skipVisibility)
>    at System.Reflection.Emit.DynamicMethod..ctor(String name, Type
> returnType, T ype[] parameterTypes, Module m)
>    at
> IronPython.Compiler.Generation.AssemblyGen.DefineDynamicMethod(String
> meth odName, Type returnType, Type[] paramTypes) [...]
>
> It goes on and on but the above is the first message.
>
> Any ideas?  Surely Admin rights aren't required to use IronPython, is it?
>
> --
> Mike Hostetler
> http://mike.hostetlerhome.com/
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>


--
Mike Hostetler
http://mike.hostetlerhome.com/



More information about the Ironpython-users mailing list