How to make an Outlook 2007 add-in add-in reliable

I have a C # .NET Outlook 2007 add-in that needs to access the address book to perform various tasks. However, every time I have to access the address book from these tasks, I get the following dialog:

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. 

Is there a way for Outlook to remember that my add-in is not malware? Thanks in advance.

+4
source share
1 answer

You need to provide full VSTO trust using caspol.exe

You can make this signing process part of your installer.

Here is the documentation for the Code Access Security Policy Tool

The command in your installer project will look like this:

 caspol -u -ag All_Code -url "{The assembly's full path}" FullTrust -n "{The code group name}". 

Here are two articles detailing the steps in Windows Installer for deploying VSTO.

http://msdn.microsoft.com/en-us/library/bb332051.aspx

http://msdn.microsoft.com/en-us/library/bb332052.aspx

+4
source

Source: https://habr.com/ru/post/1402956/


All Articles