Select to view content in your preferred language

Unable to Initialize Using Host.LicenseProductCode.ArcGISServer

160
2
12-05-2024 01:34 AM
MaxW
by
Emerging Contributor

I am certain that ArcGIS Server is installed on my computer. However, while developing a console application, I encountered an issue when using:

Host.Initialize(Host.LicenseProductCode.ArcGISServer);
 

The following error was thrown:

Initialization failed: Could not initialize an ArcGIS license
 

Interestingly, when I use Host.LicenseProductCode.ArcGISPro, the initialization works successfully.

Could anyone help me understand what might be causing this issue?

0 Kudos
2 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

Have you seen these community threads (thread1 and thread2)?

0 Kudos
MaxW
by
Emerging Contributor

I have reviewed these two topics. Using Pro 3.2's Core.dll and CoreHost.dll on a machine with Server 10.8.1 and Pro 3.2 installed, the license can be initialized successfully. However, I encountered the same issue as described in the topics you provided: when executing Core.Data to read GDB or SHP files, the program crashes.

On the other hand, using Pro 2.7's Core.dll and CoreHost.dll on a machine with Server 10.8.1 and Pro 2.7 installed, the license initialization fails.

Since Server does not include these two DLLs (Core.dll and CoreHost.dll), it seems unrelated to the Server version.
Is the Host.LicenseProductCode.ArcGISServer class simply intended for using the Server license?

0 Kudos