Hello,
I have J# DLL that I call from a C# executable. When I call a static
function in the DLL, the constructor of the class throws a
SecurityException when I run the program from a network share
(Intranet Zone, I believe).
System.TypeInitializationException: The type initializer for
"xmsn.smccl.Simulator " threw an exception. --->
System.Security.SecurityException: Security error.
at xmsn.smccl.Simulator..cctor()
--- End of inner exception stack trace ---
at xmsn.smccl.Simulator.getContext(String appName)
...
Problem is I am not doing anything that should cause the exception. At
the simplest, a J# class library with the following content would
throw an exception when I call DoStuff().
package Test;
public class SomeClass
{
static int[] someArray = new int[10];
public static void DoStuff()
{
}
}
If I uncomment the array line, it works fine.
I know I can establish full trust to the application or network share;
however, I am not allowed to do so because of corporate policies.
If somebody could provide a solution or a fix, I'd appreciate it very
much.
Thanks in advance,
Marius
Lars-Inge T?nnessen - 03 Feb 2004 11:59 GMT
http://msdn.microsoft.com/library/en-us/dv_vjsharp/html/vjgrfSecuritySemanticsFo
rApplicationsWrittenInVisualJNET.asp

Signature
Regards,
Lars-Inge Tonnessen
http://emailme.larsinge.com
http://www.larsinge.com
> I know I can establish full trust to the application or network share;
> however, I am not allowed to do so because of corporate policies.
Marius Greuel - 03 Feb 2004 16:14 GMT
Thanks!
Well, that sucks :-(. I guess I will give the Java language converter a shot.
Marius
"Lars-Inge Tønnessen" <http://emailme.larsinge.com> wrote in message news:<#bPuh0k6DHA.3804@tk2msftngp13.phx.gbl>...
> http://msdn.microsoft.com/library/en-us/dv_vjsharp/html/vjgrfSecuritySemanticsFo
rApplicationsWrittenInVisualJNET.asp
>
> > I know I can establish full trust to the application or network share;
> > however, I am not allowed to do so because of corporate policies.
Lars-Inge T?nnessen - 04 Feb 2004 17:39 GMT
Or make a C# holder object/interceptor/wrapper to the J# dlls.

Signature
Regards,
Lars-Inge Tonnessen
http://emailme.larsinge.com
http://www.larsinge.com