[mapguide-users] Mapguide 3.1.2 Hangs
Liglio
liglio at pobox.com
Tue Feb 25 09:20:16 PST 2020
Hi,
Now I know where thr error occurs. After several hours filtering layers, I
got the error "Failed to retrieve message for "MgConfigurationException"."
at siteConnection.Open(userInfo);
The next code is at UtilMap class creation. This class is used to manipulate
map layers, like filter, etc.
public UtilMap(string pstrSessionMap, string pstrMapDefinition)
{
try
{
if (pstrSessionMap.Trim() == "")
throw new Exception("Erro UtilMap: parĂ¢metro SessionMap
vazio.");
strSessionMap = pstrSessionMap;
strMapDefinition = pstrMapDefinition;
siteConnection = new MgSiteConnection();
userInfo = new MgUserInformation(strSessionMap);
try
{
siteConnection.Open(userInfo);
}
catch (Exception ex)
{
throw new Exception("Error UtilMap SiteConnection Open:
" + ex.Message);
}
featureService =
(MgFeatureService)siteConnection.CreateService(MgServiceType.FeatureService);
resourceService =
(MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);
mapName = strMapDefinition;
//if mapName is empty, I just want to work with library
repository, no map operations
if (mapName != "")
{
map = new MgMap(siteConnection);
try
{
map.Open(resourceService, mapName);
}
catch (Exception ex)
{
throw new Exception("Error UtilMap Map Open: " +
ex.Message);
}
}
}
catch (Exception ex)
{
throw new Exception("Error UtilMap creation: " +
ex.Message);
}
}
--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
More information about the mapguide-users
mailing list