Select to view content in your preferred language

How to add arcgis license checking in a web service?

876
5
11-21-2012 03:59 AM
XintaoLiu
Deactivated User
Is it possible to do so and then cite some ArcGIS references such as ESRI.ArcGIS.Geodatabase, ESRI.ArcGIS.Geometry and ESRI.ArcGIS.esriSystem to use ArcObjects? Thanks in advance.
0 Kudos
5 Replies
XintaoLiu
Deactivated User
Is it possible to do so and then cite some ArcGIS references such as ESRI.ArcGIS.Geodatabase, ESRI.ArcGIS.Geometry and ESRI.ArcGIS.esriSystem to use ArcObjects? Thanks in advance.


Or, the question can also be: how to use ArcObjects in a web service developed in C#? Thank you!
0 Kudos
SteveMaskol
Occasional Contributor
Hi,

I just came across your post and I wanted to see if you found a resolution. I am having a similar problem. I have the code to check out a license in my web service. It errors when it tries to check out either an advanced or basic license. I have tried both a WCF web service and asp.net service and both have the same result. This was not a problem at 9.3. It started at 10.1. I have an incident opened with ESRI but to make a long story short I am not getting anywhere so we are trying to get the incident escalated. Please let me know if you have found a resolution. Thanks for your help.
0 Kudos
JoseSanchez
Frequent Contributor

Same problem here!!

0 Kudos
sinumccsinumcc
Emerging Contributor

Are you considered on developing a SOE(Server object extension)?

In this way, you have not to implement lucense checking, and the performance is more powerful!

Hope this helps!

0 Kudos
JoseSanchez
Frequent Contributor

Hi I am using an old way to build .net Web Services with ArcObjects 10.2.x  or 10.4.x. This is not recommended anymore.

Public Sub New()

 

Try

 

ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop)

 

m_AOInit = New AoInitializeClass()

Dim licenseStatus As esriLicenseStatus = m_AOInit.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer)

 

Catch ex As Exception

WebServiceExceptionHandler(ex, "Init Error")

End Try

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

 

 

End Sub

Protected Overrides Sub Finalize()

 

If Not m_AOInit Is Nothing Then

m_AOInit.Shutdown()

End If

MyBase.Finalize()

 

End Sub

0 Kudos