Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-19 Thread Jeff Hardy
On Thu, Apr 19, 2012 at 3:43 PM, Slide wrote: > Since modules aren't loaded from the file system the same way on SL, I > think it shouldn't cause too much of an issue. You can rebuild IP with the > change and see if it causes any other issues. Yeah, GetPrefix() isn't really critical. It just se

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-19 Thread Slide
om > > www.wintellect.com > > ** ** > > *From:* Mattias Ahlenius [mailto:[email protected]] > *Sent:* Thursday, April 19, 2012 2:16 PM > *To:* Slide > *Cc:* Keith Rome; [email protected] > *Subject:* Re: [Ironpython-users] Problem with embedding IronPyth

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-19 Thread Keith Rome
gt; From: Mattias Ahlenius [mailto:[email protected]] Sent: Thursday, April 19, 2012 2:16 PM To: Slide Cc: Keith Rome; [email protected] Subject: Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application I've put together a small testproject, w

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-19 Thread Mattias Ahlenius
I think the binaries under: lib\Sl5 is compiled with SL4 as target and not with SL5, not sure but that may be the issue. /Mattias 2012/4/19 Slide > No, that is correct, SL5 does include the FEATURE_ASSEMBLY_LOCATION > property in the build, so you should be getting that code when you > disass

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-19 Thread Slide
It's not throwing a SecurityException, its throws a MemberAccessException (which does NOT inherit from SecurityException either). slide On Thu, Apr 19, 2012 at 10:05 AM, Jeff Hardy wrote: > > On Thu, Apr 19, 2012 at 7:45 AM, Slide wrote: >> >> No, that is correct, SL5 does include the FEATURE_A

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-19 Thread Jeff Hardy
On Thu, Apr 19, 2012 at 7:45 AM, Slide wrote: > No, that is correct, SL5 does include the FEATURE_ASSEMBLY_LOCATION > property in the build, so you should be getting that code when you > disassemble. Can you check if there is anything in the InnerException when > you catch it? SL5 has Assembly.

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-19 Thread Slide
No, that is correct, SL5 does include the FEATURE_ASSEMBLY_LOCATION property in the build, so you should be getting that code when you disassemble. Can you check if there is anything in the InnerException when you catch it? On Thu, Apr 19, 2012 at 7:28 AM, Mattias Ahlenius wrote: > Do I do someth

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-19 Thread Mattias Ahlenius
Do I do something fundamentally wrong here... The below is what I get do a disasm on the SL5 assembly in the latest distribution (2.7.2.1) Greatful for any help I could get in the right direction. Best regards, Mattias 2012/4/18 Mattias Ahlenius > > I get the following when I make a disam in

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-18 Thread Mattias Ahlenius
I get the following when I make a disam in Reflector, the exception (System.MethodAccessException) that I'm getting is not subclassing neither SecurityException or ArgumentException which is catched and handled. *private static string

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-18 Thread Slide
This really sounds like the assemblies you are referencing are not really the SL assemblies, can you open the assembly in ILSpy and decompile GetPrefix and see what you have? slide On Wed, Apr 18, 2012 at 1:44 PM, Mattias Ahlenius wrote: > Same exception even if I use the 2.7.2.1 bins: (I suppor

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-18 Thread Mattias Ahlenius
Same exception even if I use the 2.7.2.1 bins: (I support you mean 2.7.. and not 2.5..) Message: Failed to load language 'IronPython 2.7.2.1': The type initializer for 'IronPython.Modules.SysModule' threw an exception. InnerException: "Attempt by security transparent method 'IronPython.Modules.S

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-18 Thread Slide
Please make sure you have 2.5.2.1 and not just 2.5.2. On Wed, Apr 18, 2012 at 12:16 PM, Mattias Ahlenius wrote: > Thanks for your quick reply Keith, > > Tried you code and I still get the same Exception: > > "Attempt by security transparent method > 'IronPython.Modules.SysModule.GetPrefix()' to a

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-18 Thread Mattias Ahlenius
Thanks for your quick reply Keith, Tried you code and I still get the same Exception: "Attempt by security transparent method 'IronPython.Modules.SysModule.GetPrefix()' to access security critical method 'System.Reflection.Assembly.get_Location()' failed." /Mattias 2012/4/18 Keith Rome > D

Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application

2012-04-18 Thread Keith Rome
Does this not work for you? using IronPython.Hosting; // ... _python = Python.CreateEngine(); I believe that should handle the simple/typical scenarios, unless you need to alter the environment (such as plugging in a custom Host/PAL). If you need to customize the environment, then this should w