Outlook Security Managers relation to TrustCenter Settings

Add-in Express™ Support Service
That's what is more important than anything else

Outlook Security Managers relation to TrustCenter Settings
Effect of Outlook Security Manager depending on the three different options in trust center 
Nick Burger




Posts: 6
Joined: 2020-02-20
When does Outlook Security Manager have an influence on the warning message?
On the first option the warning will only appear if the anti-virus software ist out of date on not installed.
Second option will display warning message always and the third option never.
Does this mean that if I have anti-virus software installed and it is valid outlook security manager will have no effect if I have selected the first option?
Will it suppress the message on second option?


Kind regards
Nick Burger
Posted 20 Feb, 2020 06:41:35 Top
Andrei Smolin


Add-in Express team


Posts: 17840
Joined: 2006-05-11
Hello Nick,

The options describe how Outlook generate warnings - on the described condition, unconditionally, or never. If used, the Security Manager won't let the warnings show up whatever option is selected.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Feb, 2020 08:56:02 Top
Nick Burger




Posts: 6
Joined: 2020-02-20
Hi Andrei,

on my developer machine i have the secord option selected, which means 'show always'.
I have the latest version of Outlook Security Manager inatalled (6.0.0.7 of secman(xx).dll and 9.7.3407.0 of SecurityManager.2005.dll).
My Outlook is 2019 MSO (16.0.12430.20198) 64 Bit.

In our code (32 Bit) we use the following:


Application outlookApp = Marshal.GetActiveObject("Outlook.Application") as Application;
secMan = new SecurityManager();
secMan.ConnectTo(outlookApp);
secMan.DisableOOMWarnings = true;
secMan.DisableSMAPIWarnings = true;
secMan.DisableCDOWarnings = true;

When accessing outlook to create and then send an email from here I will get the security warning from Outlook although the above code is executed without an exception.

This had worked in previous version (> 2years ago) but now has stopped working.
Since we have anti-virus software installed and the first option in Outlook is the default, we did not see the message until recently when we changed the option.

Do you have any hints where to start out investigation?

Thank You
Nick
Posted 20 Feb, 2020 09:16:14 Top
Andrei Smolin


Add-in Express team


Posts: 17840
Joined: 2006-05-11
Hello Nick,

You need to install the latest Security Manager version. If it doesn't work make sure you use secman.dll/secman64.dll it provides. If you do use them and it does not work, please provide me with the exact Outlook build number and let me know if you use the Outlook object model, Simple Mapi or CDO in your code.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Feb, 2020 09:21:20 Top
Nick Burger




Posts: 6
Joined: 2020-02-20
As I already mentioned I have installed the lastest version of secman.dll, secman64.dll and securitymanager.2005.dll.
My Outlook is 2019 MSO (16.0.12430.20198) 64 Bit.
And we use Outlook Object model but also Mapi like this:

SecurityManager secMan = BeginSecurity(outlookApp);

IEnumerable<MAPIFolder> defaultSendFolders = outlookApp.Session.Stores.GetDefaultSentFolders();
foreach (MAPIFolder mapiFolder in defaultSendFolders)
{
...
}

EndSecurity(secMan, outlookApp);

-----------

private SecurityManager BeginSecurity(Application outlookApp)
{
try
{
secMan = new SecurityManager();
secMan.ConnectTo(outlookApp);
secMan.DisableOOMWarnings = true;
secMan.DisableSMAPIWarnings = true;
secMan.DisableCDOWarnings = true;
}
catch(Exception ex)
{
Logger.Debug("Error in BeginSecurity", ex);
}
}

private void EndSecurity(SecurityManager secMan, Application outlookApp)
{
try
{
if(secMan != null)
{
secMan.DisableOOMWarnings = false;
secMan.DisableSMAPIWarnings = false;
secMan.DisableCDOWarnings = false;
secMan.Disconnect(outlookApp);
secMan.SafeRelease();
}
}
catch (Exception ex)
{
Logger.Debug("Error in EndSecurity", ex);
}
}


Thank you for your qick respones
Nick
Posted 20 Feb, 2020 09:38:39 Top
Andrei Smolin


Add-in Express team


Posts: 17840
Joined: 2006-05-11
Sorry, Nick, I've missed that info. Tomorrow, I'll try to find that Outlook build and reproduce the issue.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Feb, 2020 10:03:35 Top
Andrei Smolin


Add-in Express team


Posts: 17840
Joined: 2006-05-11
Hello, Nick,

I still work on getting that Outlook build. There's a chance that I won't be able to check the issue today. In this case, I'll do this on Monday. Will keep you informed.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 21 Feb, 2020 08:47:13 Top
Andrei Smolin


Add-in Express team


Posts: 17840
Joined: 2006-05-11
Hello Nick,

I'm unable to reproduce this issue using Outlook 16.0.12430.20264 64 Bit. I've used secman64.dll (secman.dll) version 6.0.07. Make sure these files are located in the output folder of your project or in the installation folder of your program. Also, I would comment out the use of DisableCDOWarnings in your code.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 24 Feb, 2020 06:13:38 Top
Nick Burger




Posts: 6
Joined: 2020-02-20
Did you use the second option in Outlook TrustCenter (Show warning always)?

Further investigation of this issue leads us to a problem on our side, since we get the message
even with older versions of secman and Outlook which passed our quality control more than two years ago.
Posted 24 Feb, 2020 06:25:14 Top
Andrei Smolin


Add-in Express team


Posts: 17840
Joined: 2006-05-11
Hello Nick,

Nick Burger writes:
Did you use the second option in Outlook TrustCenter (Show warning always)?


I've done this right now. As explained this setting doesn't relate to the Security Manager.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 24 Feb, 2020 06:49:38 Top