I keep getting Esri.ArcGISRuntime.Http.ArcGISWebException when trying to load .mpk file

915
1
Jump to solution
01-21-2018 02:20 AM
FlorentinBoda2
New Contributor II

So firstly, I start the server with 

LocalServer.Instance.StatusChanged += ServerStatusChanged;
await LocalServer.Instance.StartAsync();

Then in the function 

private async void ServerStatusChanged(object sender, StatusChangedEventArgs e)

I have these 

if (e.Status == LocalServerStatus.Started)
{
   _localMapService = new LocalMapService(Environment.CurrentDirectory + @"\Maps\Turceni_map.mpk");
   _localMapService.StatusChanged += _localMapService_StatusChanged;
   await _localMapService.StartAsync();
}

The exception is thrown when _localMapService tries to start. I have already verified the path is correct. Also, the server seems to start with no problem. What could be the cause ? I have also attached the class file

0 Kudos
1 Solution

Accepted Solutions
FlorentinBoda2
New Contributor II

EDIT: I have resolved the issue, though it was very frustrating. I had to switch to JavaSDK to figure it out, fortunately the exception was much more suggestive there. The problem was that I had to enable RUNTIME SUPPORT in ArcMap before sharing the package. The option is found at

Customize > ArcMap Options > Enable ArcGIS Runtime Tools

.

View solution in original post

0 Kudos
1 Reply
FlorentinBoda2
New Contributor II

EDIT: I have resolved the issue, though it was very frustrating. I had to switch to JavaSDK to figure it out, fortunately the exception was much more suggestive there. The problem was that I had to enable RUNTIME SUPPORT in ArcMap before sharing the package. The option is found at

Customize > ArcMap Options > Enable ArcGIS Runtime Tools

.

0 Kudos