警告CA2141 - 我应该被保佑 [英] Warning CA2141 - Should I be warried

查看:129
本文介绍了警告CA2141 - 我应该被保佑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我在项目上运行代码分析后收到以下警告:


警告5639 CA2141: Microsoft.Security:安全透明方法'FormRegion.AddAttendeeToRecipients()'调用'APTCA程序集'Microsoft.Office.Interop.Outlook.dll'中的'AddressEntry.GetExchangeUser()'。非APTCA程序集在其公共表面区域上隐式
LinkDemands,并且不能通过透明方法调用。  http://msdn.microsoft.com/en-us/library/dd997445.aspx


所以我的问题是,我应该关注这个警告吗?如果是这样,我该怎么办呢?


非常感谢提前!


亲切的问候,


问候Programm3r

解决方案

Hi Programm3r,


感谢您在MSDN论坛上发帖。


你试过吗?通过SecurityCriticalAttribute或SecuritySafeCriticalAttribut修复它?


祝你有个美好的一天,


汤姆


Hi all,

I received the following warning after I ran a code analysis on my project:

Warning 5639 CA2141 : Microsoft.Security : Security transparent method 'FormRegion.AddAttendeeToRecipients()' calls 'AddressEntry.GetExchangeUser()' which is in non-APTCA assembly 'Microsoft.Office.Interop.Outlook.dll'. Non-APTCA assemblies have implicit LinkDemands on their public surface area, and cannot be called by transparent methods. http://msdn.microsoft.com/en-us/library/dd997445.aspx

So my question is, should I be concerned about this warning? And if so, how can I fix it?

Many thanks in advance!

Kind regards,


Regards Programm3r

解决方案

Hi Programm3r,

Thanks for posting in the MSDN Forum.

Have you try to fix it via SecurityCriticalAttribute or SecuritySafeCriticalAttribut?

Have a good day,

Tom


这篇关于警告CA2141 - 我应该被保佑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆