I am trying to activate the ArcGIS Engine with the ASR file. I am following the sample in the document.
But when we run our application, It still can't find the ArcGIS Engine license.
And I find out there one extra step user need to do. After installed the ArcEngine user need to start the ArcGIS administrator Wizard and select the "ArcGIS Engine (Single Use)" and click ok, After that everything works fine. Attached the screen shot.
Attachment 21642
My question is: Is there any way to automated this selection in the code? So user does not need to start ArcGIS administrator Wizard.
Here is the code to activate the license
But when we run our application, It still can't find the ArcGIS Engine license.
And I find out there one extra step user need to do. After installed the ArcEngine user need to start the ArcGIS administrator Wizard and select the "ArcGIS Engine (Single Use)" and click ok, After that everything works fine. Attached the screen shot.
Attachment 21642
My question is: Is there any way to automated this selection in the code? So user does not need to start ArcGIS administrator Wizard.
Here is the code to activate the license
Code:
Public Sub ActivateArcEngine()
RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine)
Dim aoAuth As IAuthorizeLicense = New AoAuthorizeLicense()
Dim strASR as String = "ASRxxx"
Dim password As String = "xxxx"
Try
aoAuth.AuthorizeASR(strASR, password)
Catch ex As COMException
Dim lastError As String = String.Empty
Dim err As Integer = aoAuth.LastError(lastError)
Console.Out.WriteLine(err.ToString + ":" + lastError)
End Try
End Sub