KB 0020
Receive license exception when attempting to run .NET application hosting Automated Solutions ActiveX Controls


CATEGORY

ActiveX Controls

 

SYMPTOMS

When you run a .NET application that is hosting one of Automated Solutions' ActiveX Controls, you receive the following error message at run time:
An unhandled exception has occurred in your application. You do not have a license to use this ActiveX control.

 

CAUSE

This error occurs when one of Automated Solutions ActiveX Controls is hosted in a .NET application, and the control was dynamically created through code rather than placing an instance of the control on a form.

Since Automated Solutions ActiveX Controls are licensed, to create the control dynamically you need to perform additional licensing steps.

 

RESOLUTION

Refer to related Microsoft Knowledgebase articles:

How to dynamically add ActiveX controls that require run-time license in Visual Basic .NET or in Visual Basic 2005

How to dynamically add ActiveX controls that require run-time license in Visual C# .NET or in Visual C# 2005