我有一个 C#.NET Outlook 2007 加载项,它必须访问地址簿才能完成各种任务。但是,每次这些任务都必须访问地址簿时,我会收到以下警告对话框:
A program is trying to access e-mail address information
stored in Outlook. If this is unexpected, click Deny and verify
your antivirus software is up-to-date.
有什么方法可以让 Outlook 记住我的加载项不是恶意软件?提前致谢。
最佳答案
您需要使用 caspol.exe 给予 VSTO 插件完全信任
您可以将此签名过程作为安装程序的一部分。
这是 Code Access Security Policy tool 的文档
安装程序项目中的命令如下所示:
caspol -u -ag All_Code -url "{The assembly’s full path}" FullTrust -n "{The code group name}".
这里有两篇文章详细介绍了 VSTO 部署的 windows 安装程序步骤
关于c# - 如何使我的 Outlook 2007 加载项受信任,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9828586/