[mapguide-users] Connecting to site failed

Jackie Ng jackie.ng at aecsystems.com.au
Sat Oct 27 00:40:10 EDT 2007


Is your mapguide service running?

- Jackie


dorra2007 wrote:
> 
> 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#a13439426
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list