Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far…

Some knows the lifecycle of an AxControl (AxTOCControl) ?

Why this question??? ok , lets put in this way.....I have a complex application, tha uses several technologies (Spring.NET, NHibernate, DevExpress components...) among them ESRI ArcObjects.

this application starts normally, it binds a product (engine or desktop) then it gets the licence (ArcEngine), it starts!!! it works!!! so it is getting the proper license ....but wait!!! in some moment, minutes after the aplication has started, then it throws a dialog box saying that i do not have the license of ArcView (in fact i do not have it...but i do not need it....my code only use functionalities related with ArcEngine...not even extensions)..if i click in the button of this dialog box, the the application is closed.

I have trying to capture the thread that launch this dialog box, but this attemps has been useless..... also i try use the tool Process Monitor and Process Explorer, but has not been able to get information.

So....I need to undertand the life cycle of the AxTOCControl to indetify when it is losing the license. Or if some knows why a control can loss the binding o the existing license....it will be very hepful!

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I think I encountered a similar issue. In my case, the application was binding just fine, as yours was, but when I tried to use any AxControls (Map, TOC, Toolbar), I got the same error that you did. (Link to my question)

I was unable to resolve the issue with technical support, but found a workaround for my project. If you are using AoInitialize put in place by your IDE (?) (in my case this is encased in LicenseInitializer that was auto-generated for me), you can try my workaround. Perhaps it will work for you? I don't know anything about Spring, NHibernate, etc., so my apologies if the syntax below doesn't match for you. I'm using VB.net.

Quick Steps:

  1. remove all the code in the ApplicationEvents file that referred to the LicenseInitializer (if you don't have this auto-generated code, remove everything the AoInitialize class is doing)
  2. Add an AxLicenseControl to your startup form; right click and choose properties to choose the license you need.
  3. Add ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop) to your startup form's Public Sub New (vb.net) or static void Main (c#)

Voila! That's what worked for me. I hope it helps. I found this article helpful in setting up the AxLicenseControl: ESRI how-to

share|improve this answer
    
I'm going to try it.....i really dont know how to do it (well in my environment)...but i'm going to do it –  XtianGIS Oct 16 '12 at 22:04
    
I try to remove the LicenseInitializer that was autogenerated, guess what? in an small application the Ax map controls, works fine without the license initializer....a little bug??? –  XtianGIS Oct 17 '12 at 19:40
    
I'm in the process of remove the LicenseInitializer that was auto-generated, and insert the AxLicenseControl...but i got a blocker....How do i configure the AxLicenseControl througth code (type of license)?? i perform changes in the AxLicenseControl but the changes are not reflected in the form1.designer.cs file –  XtianGIS Oct 17 '12 at 19:45
    
When I added the AxLicenseControl, I right-clicked in the form designer, chose properties, and then specified the type of license. This was not available in the normal properties window, just by right-clicking on the control in the designer. If you've done that, have you also added the RuntimeManager.Bind to static void Main? –  R Zeckoski Oct 20 '12 at 23:23
    
thanks, but i need to know how to perform the same process that you describe, but using code, because i perform several geograpich objects operations prior to the load of the main form –  XtianGIS Oct 22 '12 at 15:39
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.