Outlook security manager/ClickOnce clarification

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

Outlook security manager/ClickOnce clarification
After some hours of work we have ClickOnce working; just need to clarify whether we're on the right path 
Michael Dye




Posts: 8
Joined: 2009-02-20
Good afternoon,

Outlook Security Manager V7
VS2012
C#/VB 32-bit through and through
Various Windows platforms - XP to 8; 32-bit & 64-bit; incl. server
MS Office 2003 and newer - always 32-bit
ClickOnce

We have Outlook Security manager working well on our development system; brill. Took a while - needed to clean out all previous references; and ensure we have the correct MS Office PIA referenced (this is a 5 year+ project; it's gone through many versions!)

We have followed the ClickOnce instructions you've given on this site for corflags.exe and manifestfix.exe. We know it's working 'cause we can see the alteration to the manifest file in the ClickOnce directory after an install.

What we've found is: and this is where the clarification is required please:

If (any version) of secman.dll is already registered on the PC then the ClickOnce manifest modification stops Outlook security manager working.

We know this 'cause if we manually go in to the manifest file; remove the modified lines and use it then it works.

If we unregister secman.dll then the ClickOnce with the manifest modification works!

Does that makes sense? It's a real pain.

So: is there a way of telling when running the ClickOnce (first time, prior to the manifest mod!) whether secman.dll is already registered???

How do we cope with PCs that may/may not already have this DLL registered?

Help!

Thanks,

Dr. Michael Dye.
Dyetech Limited.
Posted 26 Apr, 2013 11:45:57 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Hello Michael,

When you register secman.dll, you register it as a machine-wide COM object. With clickOnce, you do this on the per-user basis.

Michael Dye writes:
So: is there a way of telling when running the ClickOnce (first time, prior to the manifest mod!) whether secman.dll is already registered???


If you develop an Outlook add-in using the .NET edition of Add-in Express, then you can try to achieve this in the ADXClickOnceModule.OnClickOnceAction event. If you develop a standalone application, then the application needs to be started for your code to check this.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 29 Apr, 2013 12:08:31 Top
Michael Dye




Posts: 8
Joined: 2009-02-20
Thanks Andrei,

Understand about detecting whether COM object is already registered.

But to return to the first point: When secman.dll is registered (for machine) then the manifest mod for ClickOnce causes us problems. In other words it's one way or the other?

That is what we find - do you think that is a correct statement?

This is what confuses us 'cause the various write-ups for reg free com imply that it's smart and checks the manifest first - allowing two (different versions of a) DLLs on same PC to be used by different applications.

That's not what we're seeing - the machine registered DLL seems to be "winning" when it shouldn't?

Could it be that our manifest mod isn't working properly?

And instead secman.dll is being found as it's in the same directory - there's something in various of these blogs and threads on this site about a version of security manager that doesn't need registering???

We're really confused and need a ClickOnce solution that will work without having to say how the PC will be configured (apart from needing .NET installed...)

Thanks,

Dr. Michael Dye.
Posted 29 Apr, 2013 13:23:09 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Hello Michael,

Well, I understand it so that you need to install AND USE the secman version supplied with your ClickOnce installer regardless of secman already registered on the machine. Is this correct?

I'll try to look into this tomorrow. I'll notify you as soon as I have any results.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Apr, 2013 11:16:44 Top
Michael Dye




Posts: 8
Joined: 2009-02-20
Thanks for the reply Andrei,

Yes you are correct - the ClickOnce needs to work with the DLLs it's got; not machine registered ones!

We've spent a frustrating day on this.

On the development PC (Windows 7 64-bit, with Office 2013 32-bit) we can build and use the software fine. If run fr om VS 2012 we get exceptions when we disable OOM but if we ignore those the email is created in MS Outlook fine. If we use ClickOnce then similar happens. Of course the (correct) secman.dll is registered on this PC.

On a test PC (Windows 2008 server 64-bit with Office 2012 32-bit) the ClickOnce works like a dream; no exceptions. We even tried registering the secman.dll to see if that would upset it; didn't seem to.

On another development system (Windows 7 64-bit; with Office 2003 32-bit) where it was "working" yesterday it's now not working at all - Outlook is warning us every time.

On another test PC (Windows 2003 Terminal Server with Office 2003 32-bit) it's also not working at all.

Our project is nice and complicated (multiple projects etc. etc.) so it's a real pain.

Now; this did all work on an older version of Outlook Security Manager - which we had to install as a pre-requisite to the ClickOnce.

So I think we have multiple issues here to do with the upgrade we've done (I wonder if the MS Office interop needs to be different?) and trying to make this upgrade work via ClickOnce without a pre-requisite.

Tomorrow we start afresh; clean small project; get that working; then we'll see wh ere the issues are I hope.

Thanks,

Dr. Michael Dye.
Posted 30 Apr, 2013 11:44:13 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Michael,

Michael Dye writes:
We know this 'cause if we manually go in to the manifest file; remove the modified lines and use it then it works.


I have an impression that there is a problem in the code that modifies the manifest. Can you please send me the manifest before and after you modify it, the code invoking ManifestFix.exe, and the code of the ManifestFix project(if you modified it)? Please find the support email address in {Add-in Express installation folder}\readme.txt. Make sure your email contains a link to this topic.

Is it a standalone application or an Outlook add-in?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 01 May, 2013 03:46:29 Top
Michael Dye




Posts: 8
Joined: 2009-02-20
Thanks Andrei; I've just sent an email - with rather a lot of text in it! I hope it helps - sorry if it's too long - we've just put everything we know in there! And attached the relevant files.

Thanks,

Dr. Michael Dye.
Posted 01 May, 2013 05:02:13 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Thank you. I've got the email. I'll inform you about my results later today.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 01 May, 2013 05:10:22 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Hello Michael,

We've identified the cause of the problem. If everything goes as expected, then later today I'll send you an assembly that is supposed to fix the problem.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 02 May, 2013 09:42:13 Top
Michael Dye




Posts: 8
Joined: 2009-02-20
Thanks Andrei, that's brilliant. Will respond here once we've tested it. Thanks, Michael.
Posted 02 May, 2013 09:47:23 Top