views:

142

answers:

2

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?

A: 

I might be wrong but if I recall correctly, COM names are separate from regular assembly attributes. Once I have written an activex in vb.net and was able to see description and title correctly.

Cem Kalyoncu
can you please help me how to set COM names in C#?
Ummar
any solution Cem??? I am waiting?
Ummar
I dont have access to .net tools anymore, so I cannot help more on this subject. Check attributes <COMName something> or from class properties dialog, I cannot remember details, sorry for that.
Cem Kalyoncu
+1  A: 

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.

jeffamaphone
yes I have signed the ActiveX control.. actually the .cab file is also signed and it shows the name correctly.. but when it tries to run it give this prompt..
Ummar
Yes I have gone through this document and have given the progID as well as code signing and other stuff in this document... but the cab file is working file, and it is showing the name properly... but when it asks the run permission.. it name vanishes..?? I have just made an ActiveX control in MFC. it is showing its name correctly.. but I still don't know how to do it in C#. as I have written almost whole code in C# and its working fine, except this name issue...
Ummar