secman registration issues

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

secman registration issues
Using x64 Windows 2008 R2 Server 
Bargholz Thomas




Posts: 236
Joined: 2006-12-18
Hi
I’ am getting the error “The 'secman.OutlookSecurityManager' COM object is not registered.” when the statement AddinExpress.Outlook.SecurityManager.ConnectTo(..) is used.
My Environment is Windows Server 2008 R2 Enterprise x64
Outlook 2010 x64
AddinExpress SecurityManager is Osmnet-v601-b3016.msi

The statement is in an assembly used by a windows service program that is compiled as Debug ANY, I have also used the assembly in a console program compiled to x64. And I get the error both times.
I have copied secman.dll and secman64.dll to “C:\Program Files\Common Files\Microsoft Shared\Outlook Security Manager”
I have tried the following:
- Registered secman64.dll and compiled my program as x64
- Registered secman64.dll and compiled my program as Debug ANY
- Registered secman.dll and compiled my program as Debug ANY
With all the above I get the following exception:
"Unhandled Exception: System.ApplicationException: The 'secman.OutlookSecurityManager' COM object is not registered. at AddinExpress.Outlook.SecurityManager.ConnectTo(Object outlookApp)
at Lector.TeamShare.TeamMemberService.Update.OfficeUpdate.InitializeSecurityManager(ApplicationClass ouApp) in C:\Projects\TeamShare\Src\PRODUCTION\2.1.295-G…..."

If I compile my program as an x86 and registered secman.dll then the program finds the secman.dll, but the statement DisableOOMWarings fails with "Unhandled Exception: System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at AddinExpress.Outlook.IOutlookSecurityManager2.Check(Int32 apiType)
at AddinExpress.Outlook.SecurityManager.set_DisableOOMWarnings(Boolean value)"

I know the above (x86) is not an option because Outlook is an x64 application.
According to you documentation I should also copy osmax.ocx and osmax64.ocx to Windows Shared folder, but I can’t find them in the distributed folder. I only get secman.dll and secman64.dll when I run the Osmnet-v601-b3016.msi package?

What do to?

Regards
Thomas
Posted 02 May, 2011 09:21:28 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
Hi Thomas,
Which edition of Outlook Security Manager do you use?
Please note that you need to deploy osmax.ocx and osmax64.ocx only if you use the ActiveX edition. If you use the .NET edition you need to deploy and register secman.dll and secman64.dll.

Please try to deploy and register both secman.dll and secman64.dll on the target PC using the following command lines:
regsvr32 <path to secman.dll>
regsvr32 <path to secman64.dll>
Do you have an exception after both dlls are registered?
Posted 02 May, 2011 09:56:20 Top
Bargholz Thomas




Posts: 236
Joined: 2006-12-18
Hi Renat,
Version is 6.1.3016 (latest).
Yes, both x86 and x64 versions are registered, but still I get the above issues.
Posted 02 May, 2011 10:23:20 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
Could you please send me a sample project, which reproduces the issue (please see readme.txt for the support e-mail address and make sure your e-mail contains a link to this topic)?
Posted 02 May, 2011 10:28:48 Top
Bargholz Thomas




Posts: 236
Joined: 2006-12-18
I will send the demo app to the support e-mail with a reference to this thread.

After further testing, we can make it work if the app is compiled specifically to x86. With the various compile platforms we get:

Compile as ANY CPU -> ERROR: “The 'secman.OutlookSecurityManager' COM object is not registered.”
Compile as x64 -> ERROR: “The 'secman.OutlookSecurityManager' COM object is not registered.”
Compile as x86 -> OK No error

All is with Windows 2008 R2 Server x64 and Outlook x64.

Though we can get it to work as x86, our solution is actually just a class in an assemply, which is loaded using reflection in an app compiled using ANY CPU. So we need our assembly to be able to compile to ANY CPU as well, so it can run as x64.
Posted 03 May, 2011 01:29:41 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
Thank you for providing me with the sample project, Thomas.

I've noticed that you use the reference to an old SecurityManager.2005.dll version in your project. Please remove this reference and add a new reference to SecurityManager.2005.dll from the Outlook Security Manager 2010 Bin folder. Did it help?
Posted 04 May, 2011 04:06:30 Top