Published Add-in not trusted

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

Published Add-in not trusted
 
Glen Lewis




Posts: 20
Joined: 2021-03-12
I am using the clickonce deployment, my customer has asked if I could resolve the issue of having to enable the add in each time excel starts.

I created a new certificate for the project, but I am guess since it is a self signed cert. It isn't trusted.

How do I do this properly so I have a trusted cert for the install and addin for excel.
Posted 27 May, 2021 13:40:46 Top
Andrei Smolin


Add-in Express team


Posts: 18219
Joined: 2006-05-11
Hello Glen,

Glen Lewis writes:
I am using the clickonce deployment, my customer has asked if I could resolve the issue of having to enable the add in each time excel starts.


Make sure the user has LoadBehavior=3 in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\{Office application}\Addins\{your add-in's ProgId}.

By default, a log file is created whenever Excel loads your add-in. The default path is {user profile}\AppData\Local\Temp\<ProductName>\adxloader.log; the ProductName part reflects the ProductName field of AssemblyInfo.cs (AssemblyInfo.vb).

Send me two copies of that log file: 1) after the add-in successfully loads, 2) after the add-in doesn't load.

Glen Lewis writes:
I created a new certificate for the project, but I am guess since it is a self signed cert. It isn't trusted.


The ClickOnce installer must be signed using a digital certificate from a certificate authority such as VeriSign, Comodo, whatever. The add-in must be signed *if* File | Options | Trust Center | Trust Center Settings | Add-ins | Require Application Add-ins to be signed by Trusted Publishers is selected.

PS. We talk about a COM add-in in Excel.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 May, 2021 04:07:21 Top
Glen Lewis




Posts: 20
Joined: 2021-03-12
The log file after I open excel and click the enable button for the Add-in.

Add-in Express Loader Log File: 05/28/2021 08:56:33:992

Startup directory: C:\Users\glen.lewis\AppData\Local\Apps\2.0\B6G343BR.YC2\DE0206NB.ZPB\exce..ddin_0e3f8980f338ba0a_0001.0000_c90d4e3eb998247c\
Loader version: 9.5.4661.0
Operating System: Microsoft Windows 10 Professional (build 21382), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE"
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
------------------------------------------------------------------------
08:56:33:993 4560 24684 The minimum supported Office version is 16
08:56:33:993 4560 24684 The host's version is 16.0.13127.21624
08:56:33:993 4560 24684 Creating a new instance of the XLL loader.
08:56:33:993 4560 24684 Loading mscoree.dll
08:56:33:994 4560 24684 INFO: Assembly codebase - C:\Users\glen.lewis\AppData\Local\Apps\2.0\B6G343BR.YC2\DE0206NB.ZPB\exce..ddin_0e3f8980f338ba0a_0001.0000_c90d4e3eb998247c\ExcelFinanceAddIn.dll.
08:56:33:994 4560 24684 INFO: Assembly version - 1.0.21.6.
08:56:33:994 4560 24684 Success.
08:56:33:994 4560 24684 Getting the CLSID of the managed XLL class.
08:56:33:994 4560 24684 Success.
08:56:33:994 4560 24684 Loading the configuration from the system registry.
08:56:33:994 4560 24684 Getting the latest CLR version.
08:56:33:995 4560 24684 The latest CLR version is 'v4.0.30319'.
08:56:33:995 4560 24684 The configuration has been loaded successfully.
08:56:33:996 4560 24684 Runtime version: v4.0.30319.
08:56:33:996 4560 24684 Assembly name: ExcelFinanceAddIn, PublicKeyToken=f5a20be33fbd8ef0.
08:56:33:996 4560 24684 Class name: ExcelFinanceAddIn.XllFunctions.
08:56:33:996 4560 24684 Registry key: CLSID\{AD843B57-C1AE-39D5-9541-6A57334312FB}.
08:56:33:996 4560 24684 Attempting to create a new instance of the managed XLL class: CLR - v4.0.30319
08:56:33:996 4560 24684 Loading CLR: v4.0.30319.
08:56:33:996 4560 24684 Calling CLRCreateInstance method.
08:56:33:996 4560 24684 Success.
08:56:33:996 4560 24684 Calling GetRuntime method.
08:56:33:996 4560 24684 Success.
08:56:33:996 4560 24684 Checking if the hosting API of .NET Framework v4.0 beta is installed.
08:56:34:004 4560 24684 The hosting API is up to date.
08:56:34:004 4560 24684 Calling SetDefaultStartupFlags method.
08:56:34:004 4560 24684 Success.
08:56:34:004 4560 24684 Calling GetInterface method for the CorRuntimeHost interface.
08:56:34:004 4560 24684 Success.
08:56:34:004 4560 24684 Starting CLR...
08:56:34:004 4560 24684 Success.
08:56:34:004 4560 24684 Getting the CLR version.
08:56:34:004 4560 24684 The CLR v4.0.30319 has been initialized successfully.
08:56:34:004 4560 24684 Creating a new domain setup.
08:56:34:004 4560 24684 Success.
08:56:34:004 4560 24684 Getting the add-in directory.
08:56:34:004 4560 24684 Success. The directory is 'C:\Users\glen.lewis\AppData\Local\Apps\2.0\B6G343BR.YC2\DE0206NB.ZPB\exce..ddin_0e3f8980f338ba0a_0001.0000_c90d4e3eb998247c\'
08:56:34:005 4560 24684 The configuration file is 'C:\Users\glen.lewis\AppData\Local\Apps\2.0\B6G343BR.YC2\DE0206NB.ZPB\exce..ddin_0e3f8980f338ba0a_0001.0000_c90d4e3eb998247c\ExcelFinanceAddIn.dll.config'
08:56:34:005 4560 24684 The 'shadow copy' is disabled.
08:56:34:005 4560 24684 Creating a new application domain.
08:56:34:008 4560 24684 Success.
08:56:34:008 4560 24684 Getting the base directory for the domain.
08:56:34:008 4560 24684 Success. The directory is 'C:\Users\glen.lewis\AppData\Local\Apps\2.0\B6G343BR.YC2\DE0206NB.ZPB\exce..ddin_0e3f8980f338ba0a_0001.0000_c90d4e3eb998247c\'.
08:56:34:008 4560 24684 Opening adxloader.dll.manifest.
08:56:34:008 4560 24684 Success. The manifest is 'C:\Users\glen.lewis\AppData\Local\Apps\2.0\B6G343BR.YC2\DE0206NB.ZPB\exce..ddin_0e3f8980f338ba0a_0001.0000_c90d4e3eb998247c\adxloader.dll.manifest'.
08:56:34:008 4560 24684 Getting the 'assemblyIdentity' element.
08:56:34:008 4560 24684 Success.
08:56:34:008 4560 24684 Getting the 'name' attribute.
08:56:34:008 4560 24684 Success. The name is 'ExcelFinanceAddIn, PublicKeyToken=f5a20be33fbd8ef0'.
08:56:34:008 4560 24684 Getting the 'name' attribute.
08:56:34:008 4560 24684 Success. The class name is 'ExcelFinanceAddIn.XllFunctions'.
08:56:34:008 4560 24684 Attempting to create a new instance of the XLL class.
08:56:34:024 4560 24684 Success.
08:56:34:024 4560 24684 Getting the dispid of the 'autoOpen' method.
08:56:34:025 4560 24684 Success.
08:56:34:025 4560 24684 Getting the dispid of the 'autoClose' method.
08:56:34:025 4560 24684 Success.
08:56:34:025 4560 24684 Getting the dispid of the 'autoAdd' method.
08:56:34:025 4560 24684 Success.
08:56:34:025 4560 24684 Getting the dispid of the 'autoRemove' method.
08:56:34:025 4560 24684 Success.
08:56:34:025 4560 24684 Getting the dispid of the 'autoFree' method.
08:56:34:025 4560 24684 Success.
08:56:34:025 4560 24684 Getting the dispid of the 'autoFree12' method.
08:56:34:025 4560 24684 Success.
08:56:34:025 4560 24684 Getting the dispid of the 'addInManagerInfo' method.
08:56:34:025 4560 24684 Success.
08:56:34:025 4560 24684 Getting the dispid of the 'addInManagerInfo12' method.
08:56:34:025 4560 24684 Success.
08:56:34:025 4560 24684 Getting the dispid of the 'Dispose' method.
08:56:34:025 4560 24684 Success.
08:56:34:025 4560 24684 Getting the dispid of the 'initialize4' method.
08:56:34:025 4560 24684 Success.
08:56:34:025 4560 24684 Invoking the 'initialize4' method.
08:56:34:093 4560 24684 Success.
08:56:34:093 4560 24684 The instance of the managed XLL class has been created successfully.
08:56:34:093 4560 24684 Forwarding xlAutoOpen to the managed code.
08:56:34:113 4560 24684 Success.
08:56:34:117 4560 24684 Start.
08:56:34:118 4560 24684 The minimum supported Office version is 16
08:56:34:118 4560 24684 The host's version is 16.0.13127.21624
08:56:34:118 4560 24684 Creating a new instance of the add-in loader.
08:56:34:118 4560 24684 Success.
08:56:34:118 4560 24684 Loading the configuration from the system registry.
08:56:34:118 4560 24684 Getting the latest CLR version.
08:56:34:118 4560 24684 The latest CLR version is 'v4.0.30319'.
08:56:34:118 4560 24684 The configuration has been loaded successfully.
08:56:34:118 4560 24684 Runtime version: v4.0.30319.
08:56:34:118 4560 24684 Assembly name: ExcelFinanceAddIn, PublicKeyToken=F5A20BE33FBD8EF0.
08:56:34:118 4560 24684 Class name: ExcelFinanceAddIn.AddinModule.
08:56:34:118 4560 24684 Registry key: CLSID\{6174AD39-E73E-45E9-A520-6F087FC81F77}.
08:56:34:118 4560 24684 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
08:56:34:118 4560 24684 Creating an instance of the managed class. Assembly identity: 'ExcelFinanceAddIn, PublicKeyToken=F5A20BE33FBD8EF0'
08:56:34:182 4560 24684 Success.
08:56:34:182 4560 24684 Unwrapping the managed class.
08:56:34:183 4560 24684 Success.
08:56:34:183 4560 24684 Querying the add-in extensibility.
08:56:34:183 4560 24684 Success.
08:56:34:183 4560 24684 Querying the custom task panes.
08:56:34:183 4560 24684 Success.
08:56:34:183 4560 24684 Querying the ribbon extensibility.
08:56:34:183 4560 24684 Success.
08:56:34:183 4560 24684 Querying the form regions.
08:56:34:183 4560 24684 Success.
08:56:34:183 4560 24684 Querying the encryption provider.
08:56:34:183 4560 24684 The 'EncryptionProvider' interface is not supported.
08:56:34:183 4560 24684 Getting the dispid of the 'Dispose' method.
08:56:34:184 4560 24684 Success.
08:56:34:184 4560 24684 Getting the dispid of the 'InitializeLoaderService' method.
08:56:34:184 4560 24684 Success.
08:56:34:184 4560 24684 Invoking the 'InitializeLoaderService' method.
08:56:34:185 4560 24684 Success.
08:56:34:185 4560 24684 The instance of the managed add-in class has been created successfully.
Posted 28 May, 2021 08:58:03 Top
Glen Lewis




Posts: 20
Joined: 2021-03-12
The Add-in doesn't fail to load, so it doesn't generate a new log until I click enable. It is just requiring me to click enable.

I did check the reg setting and the value for the LoadBehavior was set to 3.
Posted 28 May, 2021 08:59:36 Top
Glen Lewis




Posts: 20
Joined: 2021-03-12
I have a godaddy cert (pfx) I use for my website, but when I try to use it for signing it doesn't allow me too.

I am new to creating apps for windows and have not ever had to get use a cert for signing an application before. I have much experience in Web development and applying the certs to the sites.

Am I able to use an SLL Cert for this, or is it a different type of cert that is needed?
Posted 28 May, 2021 09:03:39 Top
Andrei Smolin


Add-in Express team


Posts: 18219
Joined: 2006-05-11
Hello Glen,

A website certificate may be different from a code signing certificate. What Microsoft says about code signing is at https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms537361(v=vs.85).

I've never heard of SLL certificates.

Glen Lewis writes:
The log file after I open excel and click the enable button for the Add-in.


Your log shows you load both XLL and COM add-in. But they get enabled in different ways. My question is: Is the log file updated/created before you enable the add-in?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 May, 2021 03:40:31 Top