AnsweredAssumed Answered

failed to load mmpk

Question asked by ManelKeddar on Aug 24, 2017
Latest reply on Aug 24, 2017 by MStoica-esristaff

Hello i wonder if the runtime supports to load .mmpk file , i have .mmpk with (a map and operational Layer) when i tired to load the (.mmpk) with local map server it fails and i have the following exception 

Esri.ArcGISRuntime.Http.ArcGISWebexception 

 

{"Failed to create service symbolswithbasemap MapServer. Service failed to initialize: IObjectConstruct::Construct (MapServer) hr=0x80043000 (ErrorInfo did not include a description)"}

 

private async void StartupLocalServer()
{
// Createa local map service from a map package on disk

var mapService = new LocalMapService(@"C:\Users\mkeddar\Desktop\mappackage\SymbolsWithBasemap.mmpk");

//get the service URL
var mapServiceUrl = mapService.Url;
await mapService.StartAsync();
//create a new ArcGISMAPImageLayer

Esri.ArcGISRuntime.Mapping.ArcGISMapImageLayer localServiceLayer = new Esri.ArcGISRuntime.Mapping.ArcGISMapImageLayer(mapServiceUrl);
await localServiceLayer.LoadAsync();
//dd the layer to the map
MyMapView.Map = new Esri.ArcGISRuntime.Mapping.Map();
MyMapView.Map.OperationalLayers.Add(localServiceLayer);

 

}

 

I've shared my .MMPK and my Map  please tell me if it's supported cause when i checked  local server support package i didn't see (.mmpk) files and even (.slpk) Local Server package support—ArcGIS Runtime SDK for .NET (WPF) | ArcGIS for Developers  

 

thanks 

Attachments

Outcomes