[mapguide-users] How to check if session is expired?
Jackie Ng
jackie.ng at aecsystems.com.au
Tue Sep 5 20:56:24 EDT 2006
Hi François
Thanks for the suggestion, I have since found out an easier way, to check
the length of MgSite.GetCurrentSession() as it will return an empty string
if expired.
But now when I try to access my map with this newly generated session id. I
get "Resource not found" errors. I thought that session resources would be
automatically created with the new session as stated in the API docs. (???)
I ask this question because I have actually tried bumping up the session
expiry time in the MapGuide Site admin, and it didn't seem to make any
difference :(
Regards,
Jackie Ng
AEC Spatial Pty Ltd. / AEC Systems Pty Ltd.
SYDNEY - MELBOURNE - BRISBANE - PERTH - ADELAIDE - HOBART
A.B.N: 32 075 809 451
Level 4, 37-41 Prospect St. Box Hill, Victoria, 3128
Phone: 1300 368 609
Fax: 1300 362 140
www.aecsystems.com.au
jackie.ng at aecsystems.com.au
-----Original Message-----
From: François Van Der Biest [mailto:francois.van-der-biest at onf.fr]
Sent: Tuesday, 5 September 2006 4:49 PM
To: users at mapguide.osgeo.org
Subject: Re: [mapguide-users] How to check if session is expired?
Hi Jackie,
You can catch the MgSessionExpiredException, this way :
try{
//your code
}
catch (MgSessionExpiredException $e){
echo "<em>Session expired</em>";
}
And of course, you can increase the delay before your session expires on the
"configure server" web page (MapGuide Site Administrator)
Regards,
F.
Jackie Ng a écrit :
> Hi all,
>
> Is there a way to check if a given MapGuide session ID has expired or
> not? I am experiencing this annoying problem of the mapguide session
> expiring after about 10 mins, forcing me to do a manual refresh of the
> browser. Can I do something like this?
>
> string sessionId = Request.QueryString["sessionID"]; if( sessionId is
> no longer valid) {
> sessionId = CreateSession();
> ...
> }
>
> Regards,
>
> Jackie Ng
>
> AEC Spatial Pty Ltd. / AEC Systems Pty Ltd.
> SYDNEY - MELBOURNE - BRISBANE - PERTH - ADELAIDE - HOBART
>
> A.B.N: 32 075 809 451
>
> Level 4, 37-41 Prospect St. Box Hill, Victoria, 3128
>
> Phone: 1300 368 609
> Fax: 1300 362 140
>
> www.aecsystems.com.au
> jackie.ng at aecsystems.com.au <mailto:jackie.ng at aecsystems.com.au>
>
>
More information about the Mapguide-users
mailing list