Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Set ActiveX Control Name

I have an ActiveX control and have signed it with a test certificate every this is working fine but problem is that My internet explorer shows an ugly message

The website wants to run following add-on: 'Not Available' from 'Control name is not available', If you trust the website and the add-on and want to allow it to run, click here....

Why the control name is not available? I have made this ActiveX control in C# and have added the attribute ComVisible to my assemblyInfo.cs, here is the code

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security.Permissions;
using System.Runtime.InteropServices;
//
// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: System.Runtime.InteropServices.ComVisible(true)]
[assembly: AssemblyTitle("My ActiveX Control")]
[assembly: AssemblyDescription("My ActiveX Control Description")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("CompanyXYZ")]
[assembly: AssemblyProduct("My ActiveX Control")]
[assembly: AssemblyCopyright("2009")]
[assembly: AssemblyTrademark("CompanyXYZ")]
[assembly: AssemblyCulture("")]     

//
// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers 
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.0.0.1")]

Please help me out?

like image 717
Muhammad Ummar Avatar asked Nov 23 '09 13:11

Muhammad Ummar


1 Answers

Are you signing your control? Active X controls must be signed, and the Information Band gets that information from the signature. This article is really old (1996), but should get you going in the right direction.

Edits:

You could add your control the pre-approved list as part of your install, see this document.

Also make sure register an appropriate ProgID.

Edits2:

Actually, from doing some reading it seems that managed extensions always load the runtime, so IE sees it as the runtime. Could be the same problem with Active X.

like image 151
i_am_jorf Avatar answered Oct 17 '22 18:10

i_am_jorf