Java Runtime 10.2.4 Local Server Fails unless VPN is Active

735
1
11-09-2016 02:26 PM
thomasbales
Occasional Contributor

I have a problem\bug in my Serial GPS application. Rather than creating a huge tile package for offline use I opted to use an .mpk. Interestingly, The Local Server will not work unless I am connected to the internet. More specifically, the local server coming off of port 50000 only works when I am testing the application within the corporate firewall or if I am outside of the firewall with a VPN connection. Most of the code is just esri stock for this requirement.

Any clues?

Here is a portion of the code but I don't think that is the problem, security issue?

startServerButton.addActionListener(new ActionListener() {

     @Override

     public void actionPerformed(ActionEvent e) {

      LocalServer.getInstance().initializeAsync();

      try {

      writeToTextArea("Starting local server.");

      dynamicLayer = new ArcGISLocalDynamicMapServiceLayer("C://csx_mpk//csx_offline_features_mpk.mpk");

      map.getLayers().add(3, dynamicLayer);

 

       } catch (Exception ex) {

           ex.printStackTrace();

        }

   }

});

Thanks,

Tom

0 Kudos
1 Reply
thomasbales
Occasional Contributor

Solved it. When I created my .mpk I had it pointing at my SQL database so when I was outside of the firewall the local server could not see it. Once I was behind the firewall or had a VPN connection running the application was fine. The solution, create a local GDB and then create the .mpk.