ArcGIS Engine 10 license Checkout with WCF

814
3
Jump to solution
07-04-2012 03:34 AM
sidd
by
New Contributor III
Hello

I am trying to write the licensing module of our mapping application. I am trying to checkout ArcGIS Engine license using a WCF Service. I have observed that when the licensing logic is in a WCF Service, the call to checkout license fails with an error "ArcGIS Licensing handle error". Any one has idea about this error and its resolution?
0 Kudos
1 Solution

Accepted Solutions
RichardWatson
Frequent Contributor
There are a couple of issues here. 

The first is whether or not using the ESRI software in the manner that you are trying to is permitted under the licensing terms and conditions.  I don't think that it is although you did not describe the exact details of what you are doing and how you are doing it.

The second issue is whether or not doing what you are trying to do is technically possible.

If you are running your application as a Windows service then there are some unique things about executing in that context:

  1. It typically runs using the System account which is special.  This account is very powerful locally but has no access to any network resources.  If you are using this account then try using an account that you can run ArcMap with to see if this is the problem.

  2. It runs in an invisible Windows Station.  It the software tries to display a modal dialog then it will either throw an exception or simply hang.  You might try playing with the various options to make the UI visible.

  3. I have experienced different behavior when running as a service than when running interactively.  For example, priorites can be different.  I also believe that there are resource differences as well.

Why don't you post the exact error that you are getting, i.e. the full error details.

View solution in original post

0 Kudos
3 Replies
FengZhang2
Occasional Contributor
The use of ArcObjects within a .NET Windows Service is not currently supported under any ESRI product or developer license. Please see the following tech article:

Can .NET Windows Services be created with ArcObjects? - http://support.esri.com/en/knowledgebase/techarticles/detail/29473

Hello

I am trying to write the licensing module of our mapping application. I am trying to checkout ArcGIS Engine license using a WCF Service. I have observed that when the licensing logic is in a WCF Service, the call to checkout license fails with an error "ArcGIS Licensing handle error". Any one has idea about this error and its resolution?
0 Kudos
RichardWatson
Frequent Contributor
There are a couple of issues here. 

The first is whether or not using the ESRI software in the manner that you are trying to is permitted under the licensing terms and conditions.  I don't think that it is although you did not describe the exact details of what you are doing and how you are doing it.

The second issue is whether or not doing what you are trying to do is technically possible.

If you are running your application as a Windows service then there are some unique things about executing in that context:

  1. It typically runs using the System account which is special.  This account is very powerful locally but has no access to any network resources.  If you are using this account then try using an account that you can run ArcMap with to see if this is the problem.

  2. It runs in an invisible Windows Station.  It the software tries to display a modal dialog then it will either throw an exception or simply hang.  You might try playing with the various options to make the UI visible.

  3. I have experienced different behavior when running as a service than when running interactively.  For example, priorites can be different.  I also believe that there are resource differences as well.

Why don't you post the exact error that you are getting, i.e. the full error details.
0 Kudos
sidd
by
New Contributor III
Although as mentioned by feng, we may not use ArcObjects using licensing. However, the service that I have created was running from Network Service account. As per rlwatson when I changed the account to local user account, the call to checkout licensing was successful and my problem was resolved.

Thanks a lot for your help
0 Kudos