Session end event fires but it is not executing code

  • Thread starter Thread starter Sampriti
  • Start date Start date
S

Sampriti

I am trying to delete a file from a disk when the user's
session ends. So I am putting my file.delete code in
Session_End event. I ran the application in the debug
mode. When the session timesout session event is firing
but it is not executing any of my delete code. Can
somebody tell me what I am doing wrong?

Thanks in advance
 
If you are using session mode other then InProce, session_end will not fire.

If you are usnig inproc - then how do u know it's firing if your code is not
being executed?

Also, posting the code would be helpful.
 
how do you know the Session_End event is firing? If your delete code is
correct, and works, and the session_end event is firing, and your delete
code is called in session_end, then there isn't a reason for it not to work

unless, you don't have permission to delete the file? Did you step into it
and verify that the delete code is running?
 
What Console are you trying to write to?

Instead, try logging the beginning of Session_End to a database or
something. Make sure it is executing.
 
Back
Top