开发者

SecurityException: That assembly does not allow partially trusted callers

From a C# WinForm project, I want to call a .NET COM method that already exist. I've added the reference 开发者_运维问答to the COM, but I can't get rid of the SecurityException "That assembly does not allow partially trusted callers".

Both projects are strongly named. I've added [assembly: AllowPartiallyTrustedCallers] at the top of the COM project, but it still crash when I try to call the public method.

What step did I miss?


Are they installed in the GAC?

Update: 2nd guess might be versioning issues.


I found the solution. It's explained here http://www.c-sharpcorner.com/UploadFile/psingh/CallingCOMComponentFromCSharp12022005231615PM/CallingCOMComponentFromCSharp.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜