[mapserver-users] Re: Mapscript c# VS 2010 framework 4 and memory leaks

Tamas Szekeres szekerest at gmail.com
Thu Apr 22 04:29:30 EDT 2010


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