I have a session timeout set to 1 in web.config. I wanted to check if the start and end of the session starts, as expected, so I had it in my global.asax.cs -
//In Session_Start
Response.Write("<script>alert('session started');</script>");
//In Session_End
Response.Write("<script>alert('session ended');</script>");
I get a warning when a session starts, but not when it ends. When I set breakpoints, I see that the line is executing in Session_End, but there are no warnings on the screen.
This is my first time working with sessions, and although I managed to test the functions differently, I am curious why it did not show a warning.
Thanks in advance.
source
share