Session end event fires but it is not executing code

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
 
M

Marina

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.
 
G

George Durzi

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?
 
M

Marina

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top