[mapguide-users] RE: get Session ID

GordonL gordon.luckett at arrowgeomatics.com
Wed Sep 28 15:39:39 EDT 2011


When you first embed your web layout, you can connect to MapGuide Server API
get a Sessionid and use that ID to launch the viewer, rather than using the
default.

Something like this:
    Dim configFilePath as string = "C:\Program
Files\MapGuide\Web\www\webconfig.ini"
    
    MapGuideApi.MgInitializeWebTier(configFilePath)
      
	
    Dim userInfo as MgUserInformation = new
MgUserInformation('Anonymous','')

    Dim siteConnection as MGSiteConnection = new MgSiteConnection()
    
    siteConnection.Open(userInfo)

    Dim session as string = siteConnection.GetSite().CreateSession()

Then you can open the URL of the web layout and the SESSION to open the
layout 
and you now have a .NET Variable called session to be used by .NET
*
Dim URL as string =
"/mapguide/mapviewerajax/?WEBLAYOUT=Library%3a%2f%2fLayouts%2fbasic.WebLayout&LOCALE=en&SESSION"
& session*




--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/get-Session-ID-tp6837654p6841598.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list