standalone application (You must have a license to use this ActiveX control)

4377
4
12-12-2011 12:44 AM
ImadAl_Homsi
New Contributor
I am developing a stand alone application, on my developing machine (win 7, VS 2010) works fine, problem comes to run it under testing machine with arcmap license only.
I get the exeption:
12.12.11 11:36:56 [001] [ERROR] Code:  EXCEPTION: System.ComponentModel.LicenseException: You must 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(Boolean fIgnoreVisible)
   at System.Windows.Forms.AxHost.EndInit()
   at PreFRAT.MainForm.InitializeComponent() in C:\DHI\Products\src\PreFRAT\B_PFRA\MainForm.Designer.cs:line 910
   at PreFRAT.MainForm..ctor() in C:\DHI\Products\src\PreFRAT\B_PFRA\MainForm.cs:line 169
   at PreFRAT.Program.Main() in C:\DHI\Products\src\PreFRAT\B_PFRA\Program.cs:line 30

910:  ((System.ComponentModel.ISupportInitialize)(this.axMapControl1)).EndInit();
911:  ((System.ComponentModel.ISupportInitialize)(this.axToolbarControl1)).EndInit();
912:  ((System.ComponentModel.ISupportInitialize)(this.axTOCControl1)).EndInit();
any help, thanks
Imad
0 Kudos
4 Replies
ImadAl_Homsi
New Contributor
in license properties select the reqquired product license (ArcEditor).
0 Kudos
Cristian_AndresGalindo_Londoño
Occasional Contributor III
Hi imadalhomsi

Did you solve this problem?

I have a similar situation, also with a stand alone application, but in my case, i am using an ArcGIS Runtime Engine License.

I try to instantiate the object by code, and verify the license in the same way (code)....Everything works fine in the developer environment, when I install the application in the test environment, it collapse when I run the application:

[ATTACH=CONFIG]11325[/ATTACH]

I check prerequisites, and there is no difference between the two environments.

checking the net, i found this http://support.microsoft.com/kb/326652/en-us but i don get the reason of why this is happening.

Any comment or help would be appreciated
0 Kudos
RimnetSupport
New Contributor
Did anyone get any further with this one - same issue here
0 Kudos
Cristian_AndresGalindo_Londoño
Occasional Contributor III
Hi Sean,

Try to set the project to build for x86. it solves my problem.
0 Kudos