Community
Hey I am facing a similar issue that you had faced a while ago
Have you got a solution to the issuwe below
Hi,
Thank you for your reply But I have already created a map session and my map has loaded from the XML
MgSiteConnection siteConnection = new MgSiteConnection(); siteConnection = CreateMGSession(gszMGUser, gszMGPass, gszWebConfig); string szSessionId = siteConnection.GetSite().CreateSession(); Session["Session"] = szSessionId; MgResourceService resSvc = default(MgResourceService); resSvc = (MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);
Now I want to reopen to connection to get the selected feature from the map (Selection using the mouse)
if (Session["Session"] == null) return; String mgSessionId = Session["Session"].ToString(); String mgMapName = "map"; String configPath = ConfigurationManager.AppSettings["WebConfigPath"]; MapGuideApi.MgInitializeWebTier(configPath); MgUserInformation userInfo = new MgUserInformation(mgSessionId); MgSiteConnection siteConnection = new MgSiteConnection(); siteConnection.Open(userInfo);
Here when opening the connection again using the same sessionid earlier created throws me an error "Session has expired or is invalid. Please log in again."
This error is thrown when I use AIMS 2014 but works fine with MapGuide 2011
Am missing something here
Please guide..