Add-in problem with secman

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

Add-in problem with secman
Error says secman is not registered but I thought version 8.1 did not need registering 
Mike VE




Posts: 168
Joined: 2007-09-09
I have an add-in solution with two DLLs - the main add-in and a library of utilities. Both DLLs send an email and both use secman to suppress the Outlook security dialog.

I have updated to secman 8.1.3251.2005 and I understand that this version does not need to be registered. In my setup project I have set the Register property of the secman file to DoNotRegister.

When I install and run the add-in on a test machine I have a problem. When the main add-in sends its email secman works as expected. When the class library sends an email I get an error "The secman.OutlookSecurityManager COM object is not registered." at the line securityManager.DisableOOMWarnings = true;

At first I though this must be because the utilities DLL was still referencing an earlier version of secman but this is not the case and the correct version of the file is being installed.

Is there anything else I could check?
Posted 19 Apr, 2016 13:53:51 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Mike,

In a minute I'll send you the code of a method to test in this situation.


Andrei Smolin
Add-in Express Team Leader
Posted 20 Apr, 2016 02:20:48 Top
Mike VE




Posts: 168
Joined: 2007-09-09
Thanks for the code Andrei. I used it so a message box pops up just before secman is called to show the path of the secman file. This showed that both the add-in and the helper DLL were pointing at the same secman file yet the error only came when using secman in the helper DLL.

I have found that I can send the email quite happily without secman and without the OOM Dialog popping up. The helper DLL uses the error handling routines I uses in all my products. If an error occurs the user is asked if they want to send an error report and, if they click Yes, an email is sent without being displayed. In my original products I supported all version of Outlook from 2000. Now I support only 2007 and up with occasional bespoke versions for 2003.

Can I get away without secman completely?
Posted 20 Apr, 2016 10:42:02 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Mike,

I try to create a test project to replicate the issue. Do you call SecurityManager.ConnectTo() or not?

Mike VE writes:
Can I get away without secman completely?


If you are sure that the end users have an antivirus which is regularly updated and that the end user don't specify Outlook settings that generate security warnings.


Andrei Smolin
Add-in Express Team Leader
Posted 22 Apr, 2016 05:32:54 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Mike,

I've understood this a moment ago: an Outlook add-in won't produce security warnings if it uses the "safe" Outlook.Application object - see the OutlookApp property of the add-i module; if you use a non-Add-in Express based add-in, then the safe Outlook.Application is the Outlook.Application given to the add-in at startup. A non-safe Outlook.Application is any Outlook.Application created via "new Outlook.Application" and also by calling the Application property that every Outlook object provides.


Andrei Smolin
Add-in Express Team Leader
Posted 22 Apr, 2016 07:56:32 Top
Mike VE




Posts: 168
Joined: 2007-09-09
Thanks for that Andrei. I pass the Add-in's OutlookApp property to a static class that is available throughout the solution. That seems to do the trick.
Posted 25 Apr, 2016 06:29:54 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Mike,

Thank you for letting us know.
Posted 25 Apr, 2016 10:31:36 Top