asp.net - Session_End doesn't call after i close browser -


i use below setting in web.config

<sessionstate mode="inproc" cookieless="false" timeout="10"/> 

...

<authentication mode="forms"> <forms loginurl="login.aspx" timeout="10"/> 

and in session_end according session's value change column's value in database (if column's value 1 means user online) after day user close browser column's value steel 1 (means session_end doesn't call after user close browser)

no session_end not call on page close. need use script

<script>     window.onbeforeunload = function (evt) { var message = ‘are sure want leave?’; if (typeof evt == ‘undefined’) { evt = window.event; } if (evt) { evt.returnvalue = message; } return message; }  </script> 

using script can identify when user closes browser


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -