Home » Microsoft TechnologiesRSS

ActiveX 'Not Available' from 'Control name is not available' shim workaround

Hi,

We've implemented a .NET WinForms UserControl which is hosted in IE as an ActiveX control through the use of COM Interop. However, in IE7 and IE8, the Info Bar pops up with the message:
The website wants to run the following add-on: 'Not Available' from 'Control name is not available'
We want it to display our control and publisher name instead. This is similar to this problem:
http://social.msdn.microsoft.com/Forums/en-US/windowscompatibility/thread/dbeaa13a-831b-404b-81be-c81593c1a609

where Jialang Ge suggested:
Is your ActiveX control developed in native code or .NET? If it's in .NET, a possible solution is to make a shim for it.

Does anyone have more information on this shim approach? Is it related to mscoree.dll? Does it replace it?
 

15 Answers Found

 

Answer 1

Hello

The idea is shim  is to write a native  ActiveX control, and in the native one, host Winform controls. Then you sign the native dll.
I'm looking for solutions other than shim, because this solution  looks complex and ugly. I will update you about my findings.

Regards,
Jialiang Ge

 

Answer 2

Hi,

Thanks for your help! Looking forward to your updates.
 

Answer 3

Hello FocusStealer

Sorry for the delayed response. Could you please run  signtool /verify command upon your signed dll? What do you see?

Regards,
Jialiang Ge
 

Answer 4

Hello,

When I run
signtool verify MyAssembly.dll
it says
SignTool Error: The signing certificate is not valid for the requested usage.
        This error sometimes means that you are using the wrong verification
        policy. Consider using the /pa option.
SignTool Error: File not valid: MyAssembly.dll


Then when I run
signtool verify /pa MyAssembly.dll
it says
Successfully verified: MyAssembly.dll
 

Answer 5

Hello Jialiang Ge,

Any ideas? I can see from the above results that my assembly can only be verified using the "Default Authenticode" verification policy, and not by the "Windows Driver" verification policy.

This MS document says that IE is indeed using the "Default Authenticode" verification policy:
http://www.microsoft.com/whdc/winlogo/drvsign/best_practices.mspx

So why is our control  and publisher  name not displayed? Is it because IE is displaying mscoree.dll's name instead, and if so, how do we solve that?
 

Answer 6

Sorry, FocusStealer. I did not have enough findings to be shared with you. Possibly you can try the Internet Explorer Extension Development forum:
http://social.msdn.microsoft.com/Forums/en-US/ieextensiondevelopment/threads
, in which there are a lot of IE extension dev experts.

Regards,
Jialiang Ge
 

Answer 7

Hi IE Extension Devs,

Does anyone have a solution  to my problem  above?

To Jialiang Ge: Thanks for the help. Even though it didn't lead to a solution, the effort is appreciated.
 

Answer 8

Hi FocusStealer,
Were you ever able to find a solution  to your problem? I have an ActiveX written in C#, signed (shows as verified in add-on  management) but warning bar  in IE still says 'Not Available' from 'Control Name is not available'. SignTool verify suceeds with authenticode policy. I'm stumped....
 

Answer 9

Hi MHale,

Unfortunately not. I have found some more information, but no solutions. The consensus seems to be that the 2 strings above are actually from mscoree.dll (the .NET runtime engine) rather than from your C# assembly itself. If that is the case, I would think the only way this could be solved is if mscoree.dll retrieved the publisher info  from our assemblies and forwarded it to IE. Would anyone from Microsoft care to comment?
 

Answer 10

FocusStealer,

We FINALLY got this figured out... The problem  is just as you described: mscoree.dll is registered for the CLSID of the managed dll. There is actually a wizard available from microsoft  used to create a native  C++ com  shim. Details here. The wizard is designed for working with Office add-ins but was quite easy to adapt for an IE activeX control. Our native dll  (the shim) is Authenticode signed and finally shows the correct publisher  and control  name - it's sole purpose is to create the app domain for and load the managed control. (Instead of IE loading via mscoree)
Steps we used: the wizard requires the managed DLL to implement IDTExtensibility2 (extensibility.dll), so we implemented  the interface without fleshing out the individual methods. Once the shim  was generated, we removed the extensibility reference and IDT interface. We modified the generated shim (C++) by removing the pointer refenerces to the IDT methods.
Our installer now registers the shim as a com component, instead of the managed DLL. Ugly hack but works like a charm! I'm surprised there's not more information  on how to do this or a wizard to generate the shim specifically for IE.
Let me know if you need any more info. Good luck!

 

Answer 11

That's great! I suppose that's what Jialiang Ge meant by "complex and ugly". I'll try it out nonetheless, an ugly solution  is still better than no solution.

Thanks!
 

Answer 12

We ran into some performance issues with the shim  DLL and have abandoned it for now. Instead we're setting up our clsid and our domain as an approved domain in the registry (during install) to prevent the security warning from coming up at all. It's not a thoroughly tested solution, but it's working for now.
 

Answer 13

That's unfortunate. We haven't had time to try the shim  wizard ourselves yet.

Is your new approach  the Per-Site ActiveX Controls method?

Thanks for the heads-up!
 

Answer 14

Hi MHale,

Unfortunately not. I have found some more information, but no solutions. The consensus seems to be that the 2 strings above are actually from mscoree.dll (the .NET runtime engine) rather than from your C# assembly itself. If that is the case, I would think the only way this could be solved is if mscoree.dll retrieved the dat publisher info  from our assemblies and forwarded it to IE. Would anyone from Microsoft care to comment?

I've been always concerned about it, Thanks very much! It's long, Anyone have got the solution? I've got the same problem.
 

Answer 15

Hi Microsoft Developers,

 

This is a problem  seen by many and hasn't been found to have a solution.

I recently hit this and have been frustrated trying to understand the issue.

 

Can someone please help?

 

 

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter