AnsweredAssumed Answered

ArcEngine 10 - Cannot get license

Question asked by Pimplebutt on Oct 12, 2011
Latest reply on Oct 13, 2011 by geonetadmin
My environment

  • Visual studio 2008

  • ArcEngine 10

  • VB.NET

I choose to start a new project using an ArcGIS TEmplate,
specifically, the "MapControl Application" Template.

I didn't change a single line of code, I simply ran it, and it bombed with
"You must have a license to use this ActiveX control"

Keep in mind, their own template has code in the ApplicationEvents.vb file which checks out an Engine license.

i have BOTH an engine license and desktop license on this computer.

I looked at ESRI's own advice here...

...which says to put the license checkout code in the form's Sub New() just before the call to InitializeComponent()

So I did that, ran it, and it bombed again with same message.

I attached the project so you could see for yourself.
I also attached a pic of the relevant code.
Notice in the immediate window that i have licenses.

I don't know how to get this to work programmatically.

I do NOT want to use a license control because of the nature of our application. People need to be able to start the application and use parts of it other than the map without checking out a map license, and the only way to do that is programmatically check out the license just before it's needed.

Any help is appreciated.