Session_End

G

Guest

Hi,

I created a small web app. I tried to debug within session_start and
session_end events by writting some messages into a file. The messages can be
written successfully from the session_start event, but there were no messages
from session_end event. However, the messages were written ONLY the IIS
stopped or the .dll was overwritten. It seems that the process persisted even
the browser is closed.

Any body has an idea?
 
M

Marina

This is a common misconception.

The session does *not* end just because the browser closes, or the user
navigates to a different site.
The server has no way of knowing the client closed its browser. It has no
way of knowing the client went to a different site.

The session ends in one of 3 ways:
1) The session idle timeout is reached
2) The ASP.NET application is restarted
3) The session is ended by calling Session.Abandon()
 
A

Andrea Zani

Li Pang said:
I created a small web app. I tried to debug within session_start and
session_end events by writting some messages into a file. The
messages can be written successfully from the session_start event,
but there were no messages from session_end event. However, the
messages were written ONLY the IIS stopped or the .dll was
overwritten. It seems that the process persisted even the browser is
closed.

Any body has an idea?

Do you use Request.MaPath or Server.MapPath for write the file?

In Session_End is not accesible these properties.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top