Select to view content in your preferred language

Exception loading mpk file

485
1
01-21-2020 06:38 AM
YaronAvraham
Emerging Contributor

I'm trying to load mpk file called "l_3" using LocalMapService and get this exception 

"Failed to create service l_3 MapServer. Service failed to initialize: Error unpacking map package hr=0x80004005 (No ErrorInfo)"

this is my code:

var mapService = new LocalMapService(fileName);

 await mapService.StartAsync();

StartAsync throws the exception.

I can open the same mpk file on ArcGIS Pro without any problems.

Thanks.

0 Kudos
1 Reply
PreetiMaske
Esri Regular Contributor

Some questions and things to check:

- What are the contents of the mpk? like types of layers, any networks etc.

- What version of ArcGIS Runtime SDK .Net / are you you using?

- If you put a try catch around StartAsync() do you get any additional information?

- Sometimes output window prints out relevant information too. Do you see anything written out there that may be associated to this mpk?

0 Kudos