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