<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I don't think so, because the map's current layout, zoom, properties,
etc ..., is stored in the session, so creating a new session, would
reset all those properties, giving the initial map.<br>
<br>
What you can do, is run a javascript timer that polls a page, that
performs a keep-alive of the session, as long a the browser is open.<br>
A simple way, to achieve this is to call Map.refresh every 5 minutes:<br>
<br>
<tt>window.setInterval('document.GetMapFrame().Refresh();', 50000);</tt><br>
<br>
This approach might refresh the map at times when it is not wanted (but
should be harmless).<br>
A more sophisticated way would be through an AJAX call that performs
the session access (and thus refresh) on the server.<br>
<br>
Also, I believe there is a way to set the session length, so that you
may increase it.<br>
<pre class="moz-signature" cols="72">Kenneth, GEOGRAF A/S
</pre>
<br>
<br>
Jackie Ng skrev:
<blockquote
cite="mid000001c6d0a6$a6039900$3705000a@aecmel.aecspatial.com.au"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2900.2963" name="GENERATOR">
<div><span class="679384504-05092006"><font face="Arial" size="2">Hi
all,</font></span></div>
<div><span class="679384504-05092006"></span> </div>
<div><span class="679384504-05092006"><font face="Arial" size="2">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?</font></span></div>
<div><span class="679384504-05092006"></span> </div>
<div><span class="679384504-05092006"><font face="Arial" size="2">string
sessionId = Request.QueryString["sessionID"];</font></span></div>
<div><span class="679384504-05092006"><font face="Arial" size="2">if(
sessionId is no longer valid)</font></span></div>
<div><span class="679384504-05092006"><font face="Arial" size="2">{</font></span></div>
<div><span class="679384504-05092006"> <font face="Arial" size="2">sessionId
= CreateSession();</font></span></div>
<div><span class="679384504-05092006"> <font face="Arial" size="2">...</font></span></div>
<div><span class="679384504-05092006"><font face="Arial" size="2">}</font></span></div>
<div align="left">
<p align="left"><font face="Lucida Sans Unicode" size="2">Regards,</font></p>
<p align="left"><font face="Lucida Sans Unicode" size="2">Jackie Ng</font></p>
<p align="left"><font color="#0000ff" face="Lucida Sans Unicode"
size="2">AEC Spatial Pty Ltd. / AEC Systems Pty Ltd.</font><br>
<span lang="en-au"><font color="#0000ff" face="Lucida Sans Unicode"
size="2">SYDNEY - MELBOURNE - BRISBANE - PERTH - ADELAIDE - HOBART</font></span>
<span lang="en-au"></span></p>
<p><font color="#0000ff" face="Lucida Sans Unicode" size="2"><font
size="2">A.B.N: 32 075 809 451</font></font></p>
<p><span lang="en-au"><font color="#0000ff" face="Lucida Sans Unicode"
size="2">Level 4, 37-41 Prospect St. Box Hill, Victoria, 3128</font></span></p>
<p><span lang="en-au"><font face="Lucida Sans Unicode" size="2">Phone:
1300 368 609</font></span> <br>
<span lang="en-au"><font face="Lucida Sans Unicode" size="2">Fax:
1300 362 140</font></span> </p>
<p><span lang="en-au"><font face="Lucida Sans Unicode" size="2"><a class="moz-txt-link-abbreviated" href="http://www.aecsystems.com.au">www.aecsystems.com.au</a></font></span>
<br>
<font face="Arial" size="2"><a
href="mailto:jackie.ng@aecsystems.com.au">jackie.ng@aecsystems.com.au</a></font></p>
</div>
<div> </div>
</blockquote>
</body>
</html>