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 / .NET Framework / CLR / April 2005

Tip: Looking for answers? Try searching our database.

.NET JIT throwing an Security Exception

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nachiket_pict_2002@yahoo.co.in - 29 Mar 2005 15:09 GMT
First of all I am relatively new to .NET, so bear with me.

I am facing a strange problem related to .Net JIT. Here's the problem:

I have written a .NET method(method-1) that calls into a COM+
component. When I call the method-1 independently, it works as
expected. Issue is introduced only when method calls are made in a
particular sequence. The exception occurs when the method is called.
Can't even step into the function to check which statement is throwing
the exception.

method-1: function which is failing

method-2: another function that creates the same object that method-1
tries to create.

Sequence of method calls:

method-1... method-2     works fine

method-2...method-1 throws an exception with the following msg:

"Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed."

When I tried to debug the disassembly, and put in the method address in
the memory window, it said that the method has not yet been converted
to native.

The "call " instruction was throwing an exception (don't know how). The
only conclusion I can derive is that JIT is somehow failing.
If any of u have any other conclusion or just a solution without
explanation that will also do :)

Please let me know if any part of the post is not clear.

Thanks in advance.

Nachiket
Nicole Calinoiu - 04 Apr 2005 14:17 GMT
Is method-2 in the same assembly as method-1?  If not, presumably the
method-2 assembly is missing some subset of SecurityPermission that is
required for the method-1 call.  If you need help with determining what
permission(s) might be missing and way, please post the full exception
details (as returned from its ToString method).

> First of all I am relatively new to .NET, so bear with me.
>
[quoted text clipped - 37 lines]
>
> Nachiket

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.