Preventing of Security Warnings in Outlook Part 1 of 2

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric




Since release of Outlook 2010, developers have no more possibility to use use CDO and related libraries. For long time, these libraries have been smart simplification of MAPI, which is known as very complex and developer unfriendly. More over since release of Exchange 2010, support for WebDav has also been deprecated.
The new way of programming of server components is now Exchange Web Service EWS and Outlook Object Model (the same name as in past) which is now quite simplified in Visual Studio 2010.

Unfortunately, when programming against this model you might notice security alerts (warnings) in form of popup window, when your code is trying to access protected objects like email address of one user.

Here is one example:

This is a good security model, but not really good development practice. The problem is that disabling of this protection seems to be very complex task described in many, many posts and articles in internet.
Here are just few examples:,,

The good thing is that Microsoft since Outlook 2007 provides one very simple solution for this. You do not need to use neither group policy or security templates. All you need is Vista or Windows 7 and one functioning Virus Scanner.

New security model in Outlook 2007 and 2010 takes advantage of the status of antivirus software installed on a machine where you component is running. This change represents a major departure from the way the Object Model Guard worked in the past. If Outlook is able to detect that antivirus software is running with an acceptable status, Outlook disables security warnings for the user.

More about this here:

When virus scanner reports acceptable status, you can notice that with marked icon below and can be checked by (Windows Security Centar API)

It is important, that hen Outlook is not running and your application creates the Outlook Application Object in background following icon appears:


Which means:


Here is a set of possible actions hen you click on icon:


Conclusion: To prevent Outlook of showing of security warnings install and run properly some virus scanner.

Note that this works only if the Outlook Security Guard Setting is set on

For more information see next post. Here you can find how to do it by changing of Outlook security guard settings.

Posted Jul 28 2010, 03:44 PM by Damir Dobric


Damir Dobric Posts wrote Preventing of Security Warnings in Outlook Part 2 of 2
on 07-30-2010 11:18

Since release of Outlook 2010, developers have no more possibility to use use CDO and related libraries is a .Net Community Blog powered by daenet GmbH.