I have a .Net service that periodically needs to open a file geodatabase, do some processing, and then close the fgdb. After the fgdb is closed, I want to release the license so that similar services running on other machines can grab the license for its process.
The standard documented steps that I have implemented:
aoInit = new AoInitializeClass();
(process FGDB here)
After Shutdown() is called, the license manager shows the machine still has the license checked out. The only way to get it to release the license is to stop the service.
Is there any way to release the license back to the license manager without having to close the app?
As far as I know this is the way it works and it is not a bug...
The way around is to write your ArcObject code in a different executable and run it from the main program (system call).
You can send parameters or create a file with information that the other executable will read when it starts.
Thanks Mody. That's what I was afraid of... "the way it works". It seems like this would be a relatively simple thing for Esri to address since it appears to be an open TCP connection that is keeping the product license checked out.
Moving the ArcObject code into a different executable is intriguing and probably worth pursuing. Will make for an interesting team discussion.