ArcGIS Engine 10 .Net App License Fails with Desktop 10 installed

2806
5
11-05-2010 11:46 AM
DougMarquardt
New Contributor
I have an app written in VB.Net 2008 using ArcGIS Engine 10 (Build 2414).  The license control on the usercontrol that contains my map/toc is set to 'ArcGIS Engine' (which is the default).

If I install the app on a clean (test) machine and configure the license to use the ArcGIS Engine license included with my EDN subscription everthing works as expected.  When I deploy my app to a client that has Deskop 10 installed then the app fails with this error:

'Exception has been throw by the target of an invocation'.

What do I need to do to get my app to run when Desktop 10 is installed?

Doug.
0 Kudos
5 Replies
MarcN
by
New Contributor III
Some weeks ago I have seen an example somewhere in the SDK with the code to check if ArcGIS Engine or ArcGIS Desktop license is available. I can not remember where I have seen it but try to search in the SDK documentation.
0 Kudos
DougMarquardt
New Contributor
Some weeks ago I have seen an example somewhere in the SDK with the code to check if ArcGIS Engine or ArcGIS Desktop license is available. I can not remember where I have seen it but try to search in the SDK documentation.


If I understand the docs correctly, which license is installed should not make a difference as the license control will check for both and use whatever is available.
0 Kudos
AdityaTadakaluru
New Contributor
did you resolve this issue ? Im facing the similar issue when I install my ArcGIS engine 10  .NET app on a machine with ArcGIS Desktop10.

Im doing

if (!RuntimeManager.Bind(ProductCode.EngineOrDesktop))
        {
            MessageBox.Show("Unable to bind to ArcGIS runtime. Application will be shut down.");
            return;

        }

Im getting
   You must have a license to use this ActiveX Control. Its failing on endinit of AX control.

Any ideas ?
0 Kudos
RudyLambert
New Contributor
I'm also doing

if (!RuntimeManager.Bind(ProductCode.EngineOrDesktop))
{
MessageBox.Show("Unable to bind to ArcGIS runtime. Application will be shut down.");
return;

}

...and this works, however when my form loads with the map control I get :

You must have a license to use this ActiveX Control. Its failing on endinit of AX control.

Has anyone tracked this down?
0 Kudos
RudyLambert
New Contributor
I found out the answer is indeed to create the control or controls programmatically. In VB.Net I first declared a new instance of the control:

Friend WithEvents Map1 As New ESRI.ArcGIS.Controls.AxMapControl

Then, following the InitializeComponent call, added the control:

Me.Controls.Add(Map1)

Finally, during the form load, call a routine that defines placement, anchor, etc.
0 Kudos