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😞
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
Hi,
Have you seen this thread: https://community.esri.com/t5/arcgis-pro-sdk-questions/core-host-license-with-arcgis-server-product-...
Hi,
thank you for the suggestion but I had already seen that thread and sadly it didn't help me in this case.
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.
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?
at this juncture u need tech support to help u debug your code
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