<div dir="ltr"><div>Thank you Jackie,</div><div>You saved my project it was on the edge of being closed down.</div><div><br></div><div>I made another mistake of compiling the project for .NET 4.0 but all of the MapGuide 2.2 Api</div>
<div>is runing under .NET 2.0 the only thing that did not work was the 3 minut timeout that was my setting on the MapGuide server.</div><div>The timeout was more like 4 or 5 minunts no matter what the setting in the mapGuide server said but changing the framework to 2.0 fixed it.     </div>
<div><br></div><div>I ended up implementing you GETSESSIONTIMEOUT solution with this code:</div><div><br></div><div>setInterval(function () {</div><div>                var timeoutpoll = "<a href="http://MGserverUrl/mapguide/mapagent/mapagent.fcgi?OPERATION=GETSESSIONTIMEOUT&VERSION=2.2&SESSION=">http://MGserverUrl/mapguide/mapagent/mapagent.fcgi?OPERATION=GETSESSIONTIMEOUT&VERSION=2.2&SESSION=</a>" + </div>
<div><span class="" style="white-space:pre">                            </span>MAPGUIDESESSION + "&LOCALE=en&CLIENTAGENT=Ajax%20Viewer"</div><div>                $.ajax({</div><div>                    url: timeoutpoll,</div><div>
                    context: document.body,</div><div>                    error: function (XMLHttpRequest, textStatus, errorThrown) { </div><div>                        alert(errorThrown);}</div><div>                });</div>
<div>            }, 60000);</div><div><br></div><div>I have tested the jquery code and now I can leave the map open and come back and do a zoom without getting a pink map image.</div><div>I'm sorry for the hardcoded 60 second timeout, just for tesing :-)</div>
<div><br></div><div>/Klaus Leth</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 21, 2014 at 1:22 PM, Jackie Ng <span dir="ltr"><<a href="mailto:jumpinjackie@gmail.com" target="_blank">jumpinjackie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If you want a dynamic setInterval() value instead of hard-coding 30 seconds,<br>
you can use GETSESSIONTIMEOUT as your keep-alive function<br>
<br>
<a href="http://trac.osgeo.org/mapguide/wiki/MapGuideRfc66" target="_blank">http://trac.osgeo.org/mapguide/wiki/MapGuideRfc66</a><br>
<br>
GETSESSIONTIMEOUT returns the session expiry timeout, which you can use to<br>
calibrate/schedule the next GETSESSIONTIMEOUT keep-alive request. Making<br>
this request will also keep said session alive.<br>
<br>
- Jackie<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Mapguide-session-timeout-in-Openlayers-tp5157507p5157575.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Mapguide-session-timeout-in-Openlayers-tp5157507p5157575.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the MapGuide Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
</div></div></blockquote></div><br></div>