AnsweredAssumed Answered

Test Token if Valid

Question asked by jay.kapalczynski on Aug 20, 2014

I am creating my own Token via aspx .net login page.  I am setting the Expiration of this Token as well.

Once authenticated the user is passed to an aspx page leveraging JavaScript API in a .js page to render the layers and map

It is here I am adding the Token to the Map Service: see below


var Data = "";

Data += MapServerToken;

map.addLayer(new ArcGISDynamicMapServiceLayer(Data,

    { opacity: .8 }));


If the app stands idle for an extended period of time the Token will expire.


Is there a way to test whether a Token is still valid or not via JavaScript?


If this is possible I would like to then redirect them back to a login page.


Anyone?  Thanks in advance