c# - How to get a value of a session key value pair in Session_OnEnd() method -
i have added value of order using session.add("order",1) in session when user logs out can unlock order locked when user accessing it. there other way fire database query when user logs out ? please help.
you have code in session_end method, only under following condition:
the session_onend event supported when session-state httpsessionstate.mode property value inproc, default. if session-state mode set stateserver or sqlserver, session_onend event in global.asax file ignored. if session state mode property value custom, support session_onend event determined custom session-state store provider.
if using sqlserver or stateserver session management - can implement httpmodule.
see following reference:
http://www.codeproject.com/articles/21156/asp-net-httpmodule-for-handling-session-end-with-s
http://www.ivan-nikolov.com/en/article/5/asp-net-session-state-mode-and-session-end-callback
Comments
Post a Comment