'secman.OutlookSecurityManager' COM object is not registered error

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

'secman.OutlookSecurityManager' COM object is not registered error
 
Mykhaylo Khodorev


Guest


Hi
I've met strange problem. I use Security Manager in my program. It's used for accessing Outlook data on a regular basis (scheduled or manually). I've noticed it always works fine 3 times and on 4th time gets following error:

System.ApplicationException: The 'secman.OutlookSecurityManager' COM object is not registered.
at AddinExpress.Outlook.SecurityManager.ConnectTo(Object outlookApp)

After that it continuously gets an error. After application restart behavior reoccurs. Sometimes error occurs on 5th access but anyway occurs.
Posted 05 Mar, 2012 16:24:31 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hi Mykhaylo,

Is your program a standalone application? Does it start Outlook to send an email? Does it closes Outlook after the send operation is complete? If so, then check if an Outlook.exe process is hanging in the Processes tab of the Task Manager window.

Anyway, make sure that all Outlook add-ins are turned off. To turn an add-in off, you set LoadBehavior = 0 in {HKLM and HKCU}\Software\Microsoft\Office\Outlook\Addins\{an add-in}.

Also, at http://www.add-in-express.com/downloads/osm.php, you can download the file labelled "Security Manager 2010 for Microsoft Outlook sample projects" and check if the project {outlook-security-manager-samples.zip}\VCL\SendMail produces the same behavior.

What Outlook version and bitness are you using?


Andrei Smolin
Add-in Express Team Leader
Posted 06 Mar, 2012 01:43:27 Top
Mykhaylo Khodorev


Guest


Hi, Andrey. Sorry for late response.

- It's standalone application.
- It doesn't send mails. Just accesses contacts and appointments data.
- Outlook is continuously running. The application doesn't start another instance of outlook.exe process (I guess it's just impossible anyway)
- I have disabled all add-ons. This didn't help. Same error on 4th attempt.
- I tried sample project you've suggested. However I used .NET C# version instead of VCL you've told - I don't have Delphi installed. Hope it doesn't affect result. Anyway it stated "Message is sent successfully" (I tried about 20 times) but no messages were sent.
- It's Outlook 2010 x32 on Windows 7 x64

Respectfully
Mykhaylo Khodorev
Posted 19 Mar, 2012 16:42:35 Top
Renat Tlebaldziyeu


Guest


Hi Mykhaylo,

Thank you for the detailed information.

Please note that you should register both secman.dll and secman64.dll on that PC.
Did you register both files?

You can check the secman.dll and secman64.dll registration in the windows registry. The following registry keys exist if secman.dll and secman64.dll are registered.
HKEY_CLASSES_ROOT\secman.OutlookSecurityManager
HKEY_CLASSES_ROOT\secman64.OutlookSecurityManager64
Posted 20 Mar, 2012 02:45:35 Top
Mykhaylo Khodorev


Guest


Under which circumstances both files should be registered?

In there article "Outlook Security Manager 2010 deployment" is see following:

Platform target: x86 Deploy and register: secman.dll
Platform target: x64 Deploy and register: secman64.dll

Anyway I have registered both files. The error is same.
Posted 20 Mar, 2012 03:45:58 Top
Renat Tlebaldziyeu


Guest


Thank you, Mykhaylo.

How can I reproduce the issue on my PC? Could you please show me the code that you use to disable security warnings or send a sample project (please see readme.txt for the e-mail address and make sure your e-mail contains a link to this topic)?
Posted 20 Mar, 2012 03:54:12 Top
Mykhaylo Khodorev


Guest


Code is sent to xxx@yyyyy.com.
I have noticed when I comment working routing out and keep only initiating Outlook connect and then immediately closing session like that:

this._sm.DisableOOMWarnings = false;
if (_outlookNamespace != null)
{
_outlookNamespace.Logoff();
}

the error occurs as well but later (on 7th - 8th attempt). So I assume there is some memory leak.
Posted 20 Mar, 2012 05:19:09 Top
Renat Tlebaldziyeu


Guest


Thank you for providing me with the files, Mykhaylo.

I'm sorry, I am not able to debug your application. It seems you forgot to attach the sln project file.
Could you please create a small sample project, which reproduces the issue, and send it to me for testing, or organize a remote session?
Posted 20 Mar, 2012 05:41:22 Top
Mykhaylo Khodorev


Guest


I guess remote session is more preferable. You can contact me by Skype (xxxxxx) any time.
Posted 20 Mar, 2012 06:06:04 Top