[mapguide-users] Connecting to site failed

dorra2007 dorrdor at yahoo.fr
Fri Oct 26 10:12:53 EDT 2007


I m trying to get connect to the site in order to make changes on one
specific layer, so I wrote the following code in java:

MapGuideJavaApi.MgInitializeWebTier("D:\\Program
Files\\MapGuideOpenSource\\WebServerExtensions\\www\\webconfig.ini");
MgUserInformation userInfo = new MgUserInformation(sessionid); 
MgSiteConnection siteConnection = new MgSiteConnection(); 
siteConnection.Open(userInfo); 
MgResourceService resourceService =
(MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService); 
  
MgMap map = new MgMap(); 
map.Open(resourceService, namemap); 
MgLayerCollection layers = map.GetLayers(); 

MgLayer layer = (MgLayer) layers.GetItem(layerName); 

 layer.SetVisible(true);


I obtain the following error message:

osgeo.mapguide.MgConnectionFailedException: Cannot establish connection


What is wrong?
-- 
View this message in context: http://www.nabble.com/Connecting-to-site-failed-tf4697607s16610.html#a13428163
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list