How to reset an asp.net session with ajax?

I am trying to reset an asp.net session using ajax, but it does not work. What I need to do to call reset for an IIS session or workflow.

[WebMethod] public static bool KeepAlive() { return true; } 
+4
source share
2 answers

Not quite sure, but I think the session timer will start if you use the WebMethod attribute as follows:

 [WebMethod(EnableSession=true)] public static bool KeepAlive() { return true; } 

I would try it myself, but I use my mac atm ...: P

+6
source

If EnableSession is true, then any request will reset to start the session from the very beginning. However, the IIS workflow is controlled by application pool settings and cannot be controlled by any type of external request.

0
source

All Articles