Local Feature Service not starting when MPKX has relative paths to GDB source

386
0
01-27-2022 01:30 AM
DenisGlukhov2
New Contributor II

Hi,

I'm not sure whether the problem is in Pro (v2.9.1) or in local server (I'm using v100.12). It could be fixed in either products I beleive, or there should be options I'm not aware of.

What I need: in my Runtime .Net application run local server and start a local feature service using the MPKX package file containing links to file geodatabase (GDB)

What I do: in ArcGIS Pro add layers from GDB to map and generate MPKX file using "Package Map" tool with turned on "Support ArcGIS Runtime" and "Reference all data for rauntime" options.

What I get:

  1. If "Output File" in the "Package Map" tool points to the disk or UNC root other than where GDB is located, then local server works fine.
  2. If "Output File" in the "Package Map" tool points to the same disk or UNC root where GDB is located then LocalFeatureService.StartAsync() throws an error like "Feature service creation failed. hr=0x80040067 No Layer or Table was initialized."

What I discovered: digging into mpkx/msd I found that in case #2 the package stores relative paths to GDB. Local server fails to run a service in this case. "Package map" tool doesn't provide options to force using absolute paths.

This looks like a bug, since "Support ArcGIS Runtime" option must ensure the package is compatible or the tool should provide absolute path option at least.

So, for now as a workaround we have to use different disks/UNC roots when generating MPKX.

Are there any options I'm not aware of or any other workaround for this issue or am I right this is a bug that needs fixing? 

 

Thanks

0 Replies