Life cycle of an AxControls - license missing in some point of the execution

1079
6
Jump to solution
10-01-2012 06:30 AM
Cristian_Galindo
Occasional Contributor III
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 benn 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!
0 Kudos
1 Solution

Accepted Solutions
Cristian_Galindo
Occasional Contributor III
I was unable to resolve the issue with technical support, I was using AoInitialize (in my case this was created in LicenseInitializer that was auto-generated),

Steps:

1. remove all the code in the Application that referred to the LicenseInitializer
2. Add an AxLicenseControl to startup form;
3. Add ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop)


there is a weird behavior with AoInitialize class...so...i take it away....

View solution in original post

0 Kudos
6 Replies
JohnHauck
Occasional Contributor II
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far�?�


That's awesome!


Sorry, I can't really speak to the "life cycle of the AxTOCControl" but could add some general comments. The "minutes later" is the part that throws me off as well. My first suggestion would be to test in a new simple application outside of the complexities of your existing application to try and verify if the behavior is consistent or if it requires part of this complexity to be observed. For this test please verify that you only bind to Engine and that you only check for an Engine license. As I'm sure you're aware binding and licensing are completely different processes and have completely different roles. Just want to make sure we are on the same page before we dig in more.
0 Kudos
Cristian_Galindo
Occasional Contributor III
Hello fellow,

My first suggestion would be to test in a new simple application outside of the complexities of your existing application to try and verify if the behavior is consistent or if it requires part of this complexity to be observed.


I tried to reproduce the behavior in an small application, but it was imposible, the component always works great, even extending it as a new class, as you said it maybe required the complexity.....so i said to myself: "you have to get dirty" went up my sleves and started to breaking a part the original application, I was able to repoduce the behavior just having a custom implementation of Devexpress components and ESRI components.

For this test please verify that you only bind to Engine and that you only check for an Engine license. As I'm sure you're aware binding and licensing are completely different processes and have completely different roles. Just want to make sure we are on the same page before we dig in more.


Yes, the application at the beggining (small change to try another thing...it is in engine now) was only binding to Engine, and the licence process check only for engine license.
0 Kudos
JohnHauck
Occasional Contributor II
I was looking around on the Devexpress website and it looks like they provide some WinForm and WPF controls. Could you explain some more about your use of Devexpress and how it's relating to the WinForm controls provided with ArcGIS Engine?
0 Kudos
Cristian_Galindo
Occasional Contributor III
We use the form controls of Devexpress, and extend some of their functionalities. adding properties an behaviors. At this moment, we are using XtraForm (from DevExpress v11).
0 Kudos
Cristian_Galindo
Occasional Contributor III
In that kind of component, we put the AxTOCControl, in one of my test, the window calls a windows form an inside of it was the AxTOCcontrol, in that try, the behavior was present too....
0 Kudos
Cristian_Galindo
Occasional Contributor III
I was unable to resolve the issue with technical support, I was using AoInitialize (in my case this was created in LicenseInitializer that was auto-generated),

Steps:

1. remove all the code in the Application that referred to the LicenseInitializer
2. Add an AxLicenseControl to startup form;
3. Add ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop)


there is a weird behavior with AoInitialize class...so...i take it away....
0 Kudos