Hi,

I'm new to scripting and would like to add support for IronPython to our
Silverlight application, I have tried to find an answer on the net but
could not find anyone else facing the same problem. The app is an out of
browser application.

I've added the latest release (2.7.2) from nuget, checked that the binaries
being used is from the SL5 libs-catalog: IronPython.2.7.2\lib\Sl5

The code I use to create the scripting engine is the following:

..

            _runtime = new
ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true));
_python = _runtime.GetEngine("py");

..

When GetEngine is executed I'll the following secutiry exception:

"{System.MethodAccessException: Attempt by security transparent method
'IronPython.Modules.SysModule.GetPrefix()' to access security critical
method 'System.Reflection.Assembly.get_Location()' failed.
   at IronPython.Modules.SysModule.GetPrefix()
   at IronPython.Modules.SysModule..cctor()}"

When checking the code at GitHub for the method: GetPrefix()

There are code checking a compiler-constant that seems to be if you running
in "silverlight" (don't have diskaccess to the libs), but the code seems to
be executed anyway, which makes me wonder if I still doesn't use the
correct libs for Silverlight.


Would really appreciate if someone could point me in the right direction.


Have a nice day!
-- 

Best regards,

Mattias Ahlenius
031 - 788 19 25

Good Solutions AB
http://www.goodsolutions.se
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to