警告CA2141 - 我应该被保佑 [英] Warning CA2141 - Should I be warried
问题描述
大家好,
我在项目上运行代码分析后收到以下警告:
警告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屋!