Groups | Blog | Home
all groups > dotnet security > may 2006 >

dotnet security : Security Error while Calling another Assembly



rajesh.k.ppati NO[at]SPAM gmail.com
5/30/2006 4:09:41 AM
Hi,
I get a Security Error when my WebService makes a call a method in
another assembly.
The details of the exception as viewed in immediate window of Visual
Studio are pasted below.
I am able to debug my WebService method.
However, when it tries to call a method in another assembly, it fails.
What is the most likely reason of the error ?
Rajesh

?ex
{"Security error." }
[System.Security.SecurityException]: {"Security error."}
System.Object: {System.Security.SecurityException}
_className: null
_COMPlusExceptionCode: -532459699
_exceptionMethod: <undefined value>
_exceptionMethodString: null
_helpURL: null
_HResult: -2146233078
_innerException: { }
_message: "Security error."
_remoteStackIndex: 0
_remoteStackTraceString: null
_source: null
_stackTrace: {System.Array}
_stackTraceString: null
_xcode: -532459699
_xptrs: 0
HelpLink: null
HResult: -2146233078
InnerException: { }
Message: "Security error."
Source: "MyDLL"
StackTrace: " at MyDLL.MyClass.MyMethod()\r\n at
MyDll.MyClass.MyMethod2() in
D:\\Development\\WebServices\\MyDll\\MyClass.asmx.cs:line 89"
TargetSite: <error: an exception of type:
{System.Security.SecurityException} occurred>
Nicole Calinoiu
5/31/2006 9:54:07 AM
This exception is often seen when attempting to call from partially trusted
code into a strongly named assembly that is not marked with
AllowPartiallyTrustedCallersAttribute. Might this explain your current
problem? If you're not sure, could you please provide more details about
what MyMethod does?



[quoted text, click to view]

AddThis Social Bookmark Button