Select to view content in your preferred language

Running application with ArGIS Server license

907
6
07-24-2023 02:19 AM
AleAlma
Emerging Contributor

Hi everyone,

i'm trying to run an application using an ArGIS Server license and it keeps crashing. It might need further code investigation, but reading the documentation i had a concern.

As it says in here (Initialize(LicenseProductCode) Method—ArcGIS Pro😞

  • ArcGIS Pro must be installed on the host machine
  • An ArcGIS Pro license must be available

Is that necessary even in this case?

If i run this application using Host.Initialize(Host.LicenseProductCode.ArcGISPro) with ArcGIS Pro installed and logged in it works perfectly fine.

If i use Host.Initialize(Host.LicenseProductCode.ArcGISServer) on a machine with ArcGIS Pro installed but logged out and ArcGIS Server installed and running, the application can be launched without any error, but as soon as i try to start executing a function it crashes without any error or warning.

According to the documentation i should have all the prerequisites in place, is there anything else i should check? Could it run without ArcGIS Pro installed using only ArcGIS Server?

Thank you for any help

0 Kudos
6 Replies
AleAlma
Emerging Contributor

Hi,

thank you for the suggestion but I had already seen that thread and sadly it didn't help me in this case.

0 Kudos
CharlesMacleod
Esri Regular Contributor

if Host.Initialize is successful (no exception) then the issue is with your code.  place a try catch around your code to capture the exception. that is where i would start. 

 

AleAlma
Emerging Contributor

Thanks, what you're saying makes sense. I was worrying about the initialization because it's the only difference that makes the application crashing. I'm focusing on this line:

oWS = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(@drP["FGDB_PATH"].ToString())));

I wrapped this single line in a try/catch. If i run the code locally, where ArcGIS Server is not installed, the execution ends in the catch, as i'd expect it to. If i run it on a server with ArcGIS Server installed, the application just closes. If i try to run that line in an Immediate window, i get an error prompt that roughly translates to "Destination process exited with code 1 (0x00000001) during evaluation of function 'ArcGIS.Core.Data.Geodatabase.Geodatabase')".

No catch, no exception. I don't know what to do with this. Would you have any suggestion?

0 Kudos
CharlesMacleod
Esri Regular Contributor

at this juncture u need tech support to help u debug your code

0 Kudos
AleAlma
Emerging Contributor

Unfortunately asking tech support seems to be a dead end.

I noticed a very similar question in this post Solved: Re: Core Host license with ArcGIS Server product c... - Esri Community :"Is it possible to run an app on the server with libraries and ArcGIS Server license, without installing/licensing ArcGIS Pro?"
Getting a clear answer would be really appreciated and until now Esri failed to provide it.
Moreover, why would an ArGIS Server license be mentioned in the documentation if it doesn't serve any purpose in this context? Host.LicenseProductCode Enumeration—ArcGIS Pro

0 Kudos