[mapserver-users] Re: Mapscript c# VS 2010 framework 4 and memory leaks
James Perrins
james.perrins at gmail.com
Thu Apr 22 02:29:10 PDT 2010
Thanks for that - I was looking for a setting like that but failed to find it.
However I'm not sure its the complete solution (as I've tried it and
still seem to have the same error) - the link you give states that you
need to still add:
[assembly: SecurityRules(SecurityRuleSet.Level1)] to your assembly to
revert to CLR2 transparency.
Unfortunately this
http://msdn.microsoft.com/en-us/library/dd409253(v=VS.100).aspx states
that even with the switch set - it doesn’t effect transparency rules -
which appears to be the breaking change :-(. I'm assuming code
changes need to me made to mapscript_csharp rather than any of my code
consuming it.
If I was going to have a go at adding this into the mapscript_csharp
wrapper could you give me a pointer to where to look for the source -
I seem to have compiled it OK - but am having trouble seeing where the
source is amongst everything else.
Thanks again
James
On Thu, Apr 22, 2010 at 9:29 AM, Tamas Szekeres <szekerest at gmail.com> wrote:
> 2010/4/22 James Perrins <james.perrins at gmail.com>:
>>
>>
>> Things seemed to compile - but when I call something like
>> mapObj(MyMapFile) I get an error about
>>
>> "Attempt by security transparent method
>> 'OSGeo.MapServer.mapObj..ctor(System.String)' to call native code
>> through method 'OSGeo.MapServer.mapscriptPINVOKE.new_mapObj(System.String)'
>> failed. Methods must be security critical or security safe-critical
>> to call native code."
>>
>
> This appears to be due to the different level of the security
> transparency setting of .NET FW 4.0 vs. the previous versions.
> I'll require some further testings to find out the desired solution,
> however you might want to try with the suggestions below:
> http://blogs.rev-net.com/ddewinter/2009/05/20/opting-out-of-security-changes-in-net-4/
>
> Best regards,
>
> Tamas
>
More information about the MapServer-users
mailing list