Session_End event

M

Marek

I have web app written using VS2005 Prof. App is running on W2K Server, IIS
5.0 and ASP.NET 2.0 and Session_End event is not fired. On Windows 2003
server, IIS 6.0 and ASP.NET 2.0 this event is fired? Who knows why under W2K
this event is not fired?

MP
 
K

Kevin Spencer

What makes you think it's not being fired?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

This is, by definition, not that.
 
M

Marek

U¿ytkownik "Kevin Spencer said:
What makes you think it's not being fired?

--

Session_End method in global.asax has code for updating one column i given
table. On the Windows 2003 server it runs but on the W2K server it does not
runs.

On both serwers sessionStat is set to InProc.

MP
 
K

Kevin Spencer

How long are you waiting for the Session to end? Also, are you sure you're
not getting an exception when attempting to update the table on the W2K
server?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

This is, by definition, not that.
 
M

Marek

U¿ytkownik "Kevin Spencer said:
How long are you waiting for the Session to end?

20 minutes.

Also, are you sure you're
not getting an exception when attempting to update the table on the W2K
server?

Table is updated from time to time now. Update statement is very simply.

oCommand.CommandText = "UPDATE tabele SET column = GETTIME() where id =
"+Session["SESION_ID"].ToString()

MP
 
N

NumbLock

U¿ytkownik "Kevin Spencer said:
How long are you waiting for the Session to end?

20 minutes.

Also, are you sure you're
not getting an exception when attempting to update the table on the
W2K server?

Table is updated from time to time now. Update statement is very
simply.

oCommand.CommandText = "UPDATE tabele SET column = GETTIME() where id
= "+Session["SESION_ID"].ToString()

MP

I've noticed a couple of times where there was a race condition in
ASP.Net. Is one of your servers older? Is the win2k server more
powerful? It might be that on an older system, the session cleanup is
slower and thus still exists in the global.asax event. It might be
possible that the session is cleaned up before the event fires on the
new server (if it is indeed more powerful) Try putting a time delay in
the beginning of the event on the one where the update statement runs in
global.asax. If it starts doing the same thing, then you have a race
condition.

Good Luck!
 

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

Top