[mapguide-users] Mapguide session timeout in Openlayers

Klaus Pedersen klauslp at gmail.com
Mon Aug 25 04:09:18 PDT 2014

Thank you Jackie,
You saved my project it was on the edge of being closed down.

I made another mistake of compiling the project for .NET 4.0 but all of the
MapGuide 2.2 Api
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.
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.

I ended up implementing you GETSESSIONTIMEOUT solution with this code:

setInterval(function () {
                var timeoutpoll = "
                    url: timeoutpoll,
                    context: document.body,
                    error: function (XMLHttpRequest, textStatus,
errorThrown) {
            }, 60000);

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.
I'm sorry for the hardcoded 60 second timeout, just for tesing :-)

/Klaus Leth

On Thu, Aug 21, 2014 at 1:22 PM, Jackie Ng <jumpinjackie at gmail.com> wrote:

> If you want a dynamic setInterval() value instead of hard-coding 30
> seconds,
> you can use GETSESSIONTIMEOUT as your keep-alive function
> http://trac.osgeo.org/mapguide/wiki/MapGuideRfc66
> GETSESSIONTIMEOUT returns the session expiry timeout, which you can use to
> calibrate/schedule the next GETSESSIONTIMEOUT keep-alive request. Making
> this request will also keep said session alive.
> - Jackie
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Mapguide-session-timeout-in-Openlayers-tp5157507p5157575.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20140825/86e20009/attachment.html>

More information about the mapguide-users mailing list