"You do not have a license to use this ActiveX control."

AcidicChip

Newcomer
Joined
Oct 25, 2002
Messages
10
Location
Riverside, CA
I made a program in vb.NET (My first one in vb.NET)... I'm finally finished, and I wanted to test it on my other box. When I copy my /bin folder to my other box, and I run the program, I get an error saying "You do not have a license to use this ActiveX control.". I have the .NET Framework installed and everything. I went to Microsoft's site, and from what I understand, that means that the information for the ActiveX control isn't found in the registry. I need to know how to find out what registry information I need to have, so I can add it to the registry of my other box... Or if that is even what needs to be done. Let me know, I would greatly appreciate it. Thanks!

Here is the additional information in the text box at the bottom of the JIT...

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.LicenseException: You do not have a license to use this ActiveX control.
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnParentVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Form.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/microsoft.net/framework/v1.0.3705/mscorlib.dll
----------------------------------------
My Program
Assembly Version: 1.0.1091.19017
Win32 Version: 1.0.1091.19017
CodeBase: file:///C:/Program%20Files/My%20Program/My%20Program.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.3300.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system/1.0.3300.0__b77a5c561934e089/system.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.3300.0
Win32 Version: 7.00.9502
CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.3300.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.3300.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Data
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.3300.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.3300.0__b77a5c561934e089/system.xml.dll
----------------------------------------
AxInterop.ComctlLib
Assembly Version: 1.3.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/AxInterop.ComctlLib.DLL
----------------------------------------
AxInterop.MSWinsockLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/AxInterop.MSWinsockLib.DLL
----------------------------------------
AxInterop.InetCtlsObjects
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/AxInterop.InetCtlsObjects.DLL
----------------------------------------
Interop.ComctlLib
Assembly Version: 1.3.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/Interop.ComctlLib.DLL
----------------------------------------
Interop.InetCtlsObjects
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/Interop.InetCtlsObjects.DLL
----------------------------------------
Interop.MSWinsockLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/Interop.MSWinsockLib.DLL
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
 
Here is the list of References that show in the Visual Studio, incase you need that information:

References:
*AxInterop.ComctlLib
*AxInterop.InetCtlsObjects
*AxInterop.MSComctlLib
*AxInterop.MSMask
*AxInterop.MSWinsockLib
*Interop.ComctlLib
*Interop.InetCtlsObjects
*Interop.MSComctlLib
*Interop.MSMask
*Interop.MSWinsockLib
*stdole
*System
*System.Configuration.Install
*System.Data
*System.DirectoryServices
*System.Drawing
*System.Management
*System.Messaging
*System.Windows.Forms
*System.Xml
 
I went ahead and hit continue on the JIT, and then when my program loaded I started hitting buttons... Everything worked, then I hit a certain button and the JIT came up displaying this...

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
Cannot invoke property get of 'CtlState' at this time.


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/microsoft.net/framework/v1.0.3705/mscorlib.dll
----------------------------------------
IP Bulker 2.0
Assembly Version: 2.0.1091.24665
Win32 Version: 2.0.1091.24665
CodeBase: file:///C:/Program%20Files/My%20Program/My%20Program.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.3300.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system/1.0.3300.0__b77a5c561934e089/system.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.3300.0
Win32 Version: 7.00.9502
CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.3300.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.3300.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Data
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.3300.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.3300.0__b77a5c561934e089/system.xml.dll
----------------------------------------
AxInterop.ComctlLib
Assembly Version: 1.3.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/AxInterop.ComctlLib.DLL
----------------------------------------
AxInterop.MSWinsockLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/AxInterop.MSWinsockLib.DLL
----------------------------------------
AxInterop.InetCtlsObjects
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/AxInterop.InetCtlsObjects.DLL
----------------------------------------
Interop.ComctlLib
Assembly Version: 1.3.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/Interop.ComctlLib.DLL
----------------------------------------
Interop.InetCtlsObjects
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/Interop.InetCtlsObjects.DLL
----------------------------------------
Interop.MSWinsockLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/My%20Program/Interop.MSWinsockLib.DLL
----------------------------------------
Accessibility
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.0
CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.3300.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
 
You shouldn't be using those ActiveX controls, period. You don't get a license to use them with Visual Studio.NET.

Having said that, if the ocx controls are installed AND registered on the target machine, it should work.
 
I thought you knew that you have to register your controls before they'll work. If anyone else can offer any suggestions they will, you don't have to repeat yourself.
 
In the customize toolbox window, under COM components, it shows where the ocx is. Yes, you have to use regsvr32 to register it on the target machine.
 
Is it every one of those in the COM components I have to include when I distribute the program? Or is there a way to tell which one of those it is I need to use? I have Install Shield Developer, and I had it do a dynamic dependancy scan, and even after that it seemed not to work on other boxes.
 
You only need to include those that are checked. There's a possiblity that your app might have ones in that aren't checked in the list, in which case you'll just have to find them yourself. It might tell you under the referenced section in solution explorer.

I'll say it again though, you should NOT be using those activex controls in a .NET application.
 
Well, my refrences are posted above... Tell me how to find out what activex references are being used, and I'll remove them, and find another way to do what ever it was with the activex.
 
Ok.

It looks like you have a reference to the ActiveX common controls, which is pointless because all the common controls have .NET replacements in the toolbox by default.

You also have a reference to the Winsock control, which you shouldn't be using either. You should learn the .NET Socket or TcpClient class instead.

Lastly, it appears you're using the INet control. There is no direct replacement for its FTP functionality, but there is a code snippet for how to download data from an HTTP server posted on this board somewhere.
 
The problem is AxMSWinsockLib.AxWinsock() ... How would I get it to license?

I'm a vb.NET retard, so your help has been VERY useful, and I appreciate your time. Thanks.
 
I believe there was a licensing issue with that control that was solved in a service pack.

Since you only have that control because you have a visual studio 6 product, I suggest you download and install the latest service pack for that (5) and then ship that control with your application. Once that is registered, hopefully your licensing problem will be resolved. If it isn't, I'm afraid I'm out of ideas...
 
Don't use the Winsock control. The best way is to write your own
class using the System.Sockets class (look in your MSDN for more).
You can probably get tons of premade classes for winsock, too, on
places such as PlanetSourceCode. I personally don't like
PlanetSourceCode, but a class you'll get there is probably better that
using the Winsock control. If you can avoid it, try not using any ActiveX
controls at all (unless there are no good alternatives, such as is the
case with the CodeSense control).

[edit]I realize this may not be an option currently, and sorry if that
is the case, I will be of no help, but in the future try not to use the
Winsock control[/edit]
 
Last edited:
Hi!
I'm trying to use a MSFlexGrid control in my VB.NET project but when I try
to use it I get a message:
"You do not have a license to use this ActiveX control"
divil says: "It looks like you have a reference to the ActiveX common controls, which is pointless because all the common controls have .NET replacements in the toolbox by default." Then my question is : What control has replaced the FlexGrid control in .NET ?? I can't find one ! Is there another control i can use that can do the same as the FlexGrid contol ?

HELP ME !!

regards
Peter
 
I am having this problem as well. (An Active X error when I launch my program on the client computer.).

I am not using the FlexGrid control, but I am using the Masked Edit control - is that an Active X control? I've never used it before, but I couldn't find a .Net replacement for what it does, and everywhere I read online said that it is still the best control for what it does.

I don't remember activating, or running regsvr32 on anything on my Development system.. This is what is confusing me on this issue.. I'm struggling to find if I need to or not.. On my client system I've got XP SP1 (which has MDAC 2.7 in it) and .Net Framework 1.0 and 1.1 as well as the 1.1 Redist from SDK (just to be sure it's all there!)

I don't get the error on the main form window of my application.. (VB.NET, Window Form) But on the second form I get the JIT error... My second form has the Masked Edit controls, so is that my best guess? Is there a license issue with this that I need to purchase to redistribute?
 
Back
Top