Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Visual J# / February 2004

Tip: Looking for answers? Try searching our database.

SecurityException thrown by static array cctor

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marius Greuel - 03 Feb 2004 00:49 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.