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
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.