Question

I have a C#.NET Outlook 2007 add-in that has to access the address book to accomplish various tasks. However, every time on of these tasks has to access the address book I get the following warning 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 some way to have Outlook remember that my add-in isn't malware? Thanks in advance.

Was it helpful?

Solution

You need to give the VSTO addin full 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 would look like:

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

Here are two article that details the windows installer steps for VSTO deployment

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top