Select to view content in your preferred language

Local Map Service will not Start.

145
0
10-15-2024 06:38 AM
Labels (2)
BrentHoskisson
Frequent Contributor

I am not sure what I am missing.  I have the following code to display an mpkx file:

Map = new Map(BasemapStyle.ArcGISLightGray);
var myLocalMapService = new LocalMapService(@"c:\Temp\FabricParcels.mpkx");
await myLocalMapService.StartAsync();    //CRASHES!

Map.OperationalLayers.Add(new ArcGISMapImageLayer(myLocalMapService.Url));

 

The StartAsync command crashes with this message: 

Esri.ArcGISRuntime.Http.ArcGISWebException: 'Failed to create service fabricparcels MapServer. Worker process 'fabricparcels_host' exited while attempting to service request (attempt 1 of 1): endpoint='admin' headers={} params={enableDynamicLayers=, filePath=c:\temp\fabricparcels.mpkx, maxRecords=1000, name=fabricparcels, outputDir=C:\Users\xyzxyz\AppData\Local\Temp\localserver_23732\fabricparcels, type=MapServer, virtualDir=http://127.0.0.1:50000/R4MwTp/outputdir/fabricparcels} res='create' post=0 Crash dump path=C:\Users\xyzxyzx\AppData\Local\Temp\LocalServerErrorReports\localserver_200.1.0.3842_service_20241014_193914.dmp'

 

The mpkx file starts just fine by double-clicking it.  I am guessing I missed something basic, but I don't know what it is.  Please Help

Thanks,

Brent Hoskisson

 

0 Kudos
0 Replies