Unable to start LocalMapService for Esri.ArcGISRuntime v100.0

3498
11
Jump to solution
02-21-2017 12:20 AM
Jesper_SlothChristensen
New Contributor II

I am trying to load an .mpk file onto the map by using a LocalMapService, but I am unable to start the LocalMapService (I get an error that says "Local server install path is not valid"). From what I have been able to find, this is because I am missing the Esri.ArcGISRuntime.Toolkit which has not yet been released for Esri.ArcGISRuntime v.100. Is that correct?

0 Kudos
1 Solution

Accepted Solutions
AnttiKajanus1
Occasional Contributor III

Hi, that shouldn't be the case. Have you installed local server to your machine? You can find the download from here. In 100.0 releases, local server is separated from the SDK install.

View solution in original post

0 Kudos
11 Replies
AnttiKajanus1
Occasional Contributor III

Hi, that shouldn't be the case. Have you installed local server to your machine? You can find the download from here. In 100.0 releases, local server is separated from the SDK install.

0 Kudos
Jesper_SlothChristensen
New Contributor II

Thank your for your help. I was not aware that the LocalServer had to be installed seperately. I can now get an instance of the LocalServer and attempt to start it. Unfortunately this results in an exception with the message "Server process exited unexpectedly during startup". Any idea what causes this?

0 Kudos
AnttiKajanus1
Occasional Contributor III

We separated the local server install from the SDK to keep the basic download/install smoother.

Sounds like something goes really awry. Can you post your code that you are using?

0 Kudos
Jesper_SlothChristensen
New Contributor II

Yes of course, here it is. (log is a Log4Net instance for printing debug messages). The runtime environment has been initialized before this code is executed.

                LocalServer ls;
                LocalMapService lms;
                try
                {
                    if (LocalServerEnvironment.CheckInstallValid())
                    {
                        ls = LocalServer.Instance;
                        ls.AppDataPath = @"C:\Users\jsc\Documents\ArcGIS";
                        log.Debug("LocalServer status: " + ls.Status.ToString());
                        await ls.StartAsync();
                        lms = new LocalMapService(@"C:\Users\jsc\Documents\ArcGIS\Test1.mpk");
                        log.Debug("Local Map Service Url: " + lms.Url);
                    }
                }catch(Exception exc)
                {
                    log.Debug("Failed to start local map service: " + exc.Message);
                }

0 Kudos
AnttiKajanus1
Occasional Contributor III

So the issue occurs on line await ls.StartAsync()? Can you try to set the AppDataPath to something else such as temp directory or use the default. Does that help?

0 Kudos
Jesper_SlothChristensen
New Contributor II

Yes, that is correct. ls.StartAsync() causes the exception. Setting AppDataPath to "C:\Users\jsc\AppData\Local\Temp" or not setting it at all yields the same result.

0 Kudos
AnttiKajanus1
Occasional Contributor III

Could you provide about information about the configuration that you are using?

- operation system version

- x64/x86

- can you enable logging for the local server (install path/localserver100.0/32/bin/LocalServerUtility.exe) and see what is written to the log

0 Kudos
Jesper_SlothChristensen
New Contributor II

Thank you for that tip. It seems to have something to do with my license (although I don't know what the solution is yet). My application is built for x86, and I am running a 64 bit Windows 10. The log from LocalServerUtility looks like this:

2017-02-24 08:16:37,786  INFO rid=    '' Server - Message : Log file path : "C:\Users\jsc.DGHOST\AppData\Local\Temp\ArcGISRuntimeLogs/arcgisruntime_16852.log"
2017-02-24 08:16:37,792  INFO rid=    '' Server - Message : DataDir : "C:\Users\jsc.DGHOST\AppData\Local\Temp\arcgisruntime_16852"
2017-02-24 08:16:37,795  INFO rid=    '' Server - Message : AppDataLocalDir : "C:\Users\JSC~1.DGH\AppData\Local\Temp\Local"
2017-02-24 08:16:37,796  INFO rid=    '' Server - Message : AppDataRoamingDir : "C:\Users\JSC~1.DGH\AppData\Local\Temp\Roaming"
2017-02-24 08:16:37,797  INFO rid=    '' Server - Message : AppDataCommonDir : "C:\Users\JSC~1.DGH\AppData\Local\Temp\Common"
2017-02-24 08:16:37,798  INFO rid=    '' Server - Message : MyDocumentsDir : "C:\Users\JSC~1.DGH\AppData\Local\Temp\Documents"
2017-02-24 08:16:37,798  INFO rid=    '' Server - Message : CrashDumpPath : "C:\Users\jsc.DGHOST\AppData\Local\Temp\ArcGISRuntimeErrorReports"
2017-02-24 08:16:37,799  INFO rid=    '' Server - Message : Message : Attempt to use functionality that is not supported for the current license level

0 Kudos
Jesper_SlothChristensen
New Contributor II

OK, It seems that I have the answer. In my application I have entered a license key belonging to a Basic License, and that prevented my from starting the LocalServer. I have currently removed the license key and the application is now running on a developer license - that enabled me to start the LocalServer.

We are currently looking into upgrading our license, but until then I will continue to use the developer license while testing the LocalServer. Thankyou for your help!

P.S.: An exception message more informative than "Server process exited unexpectedly during startup" would have been helpful 🙂