I've got an ASP.NET page with a counter subtraction routine in the
Session_End method in the Global.asax.cs:
protected void Session_End(Obj ect sender, EventArgs e)
{
ulong curUsers;
Application.Loc k();
curUsers = (ulong)Applicat ion["curUsers"];
curUsers--;
Application["iCurUsers"] = curUsers;
Application.UnL ock();
}
Basically, this is supposed to keep track of the number of users that are
logged into the system by keeping track of the number of open sessions --
except that the Session_End NEVER fires. I've checked my web.config file
and it does show the mode as InProc:
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="20"
/>
Is there something else I missed?? 9 10803
How do you know for sure that it NEVER fires? The Session_End Event happens
usually some time after the user has closed their browser or navigated
elsewhere. As the server has no idea what is happening on the client, the
Session ends 20 (by default, and according to your web.config file) minutes
after the last Request from that user. So, again, are you sure it is NEVER
firing?
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer http://www.takempis.com
Some things just happen.
Everything else occurs.
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message
news:yL******** ************@ne wssvr28.news.pr odigy.com... I've got an ASP.NET page with a counter subtraction routine in the Session_End method in the Global.asax.cs:
protected void Session_End(Obj ect sender, EventArgs e)
{
ulong curUsers;
Application.Loc k();
curUsers = (ulong)Applicat ion["curUsers"];
curUsers--;
Application["iCurUsers"] = curUsers;
Application.UnL ock();
}
Basically, this is supposed to keep track of the number of users that are logged into the system by keeping track of the number of open sessions -- except that the Session_End NEVER fires. I've checked my web.config file and it does show the mode as InProc:
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="20"
/>
Is there something else I missed??
I print the value of the curUsers counter (along with another one that is
supposed to keep track of the number of users that have ever visited the
site) on the home page. The values of these two counters are ALWAYS equal
and get reset at the same time (I've had both counters up to over 2000
before the application ended and each counter was reset to 0...because I
have a Application_End () routine that is supposed to save the counter to a
file -- and an accompanying Application_Sta rt() routine to read it in so
that when the application starts again, I can start counting where I left
off -- but never seems to fire either. The counter file is always set to
0).
"Kevin Spencer" <ke***@SPAMMERS SUCKtakempis.co m> wrote in message
news:#A******** ******@tk2msftn gp13.phx.gbl... How do you know for sure that it NEVER fires? The Session_End Event
happens usually some time after the user has closed their browser or navigated elsewhere. As the server has no idea what is happening on the client, the Session ends 20 (by default, and according to your web.config file)
minutes after the last Request from that user. So, again, are you sure it is NEVER firing?
HTH,
Kevin Spencer Microsoft FrontPage MVP Internet Developer http://www.takempis.com Some things just happen. Everything else occurs.
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message news:yL******** ************@ne wssvr28.news.pr odigy.com... I've got an ASP.NET page with a counter subtraction routine in the Session_End method in the Global.asax.cs:
protected void Session_End(Obj ect sender, EventArgs e)
{
ulong curUsers;
Application.Loc k();
curUsers = (ulong)Applicat ion["curUsers"];
curUsers--;
Application["iCurUsers"] = curUsers;
Application.UnL ock();
}
Basically, this is supposed to keep track of the number of users that
are logged into the system by keeping track of the number of open
sessions -- except that the Session_End NEVER fires. I've checked my web.config
file and it does show the mode as InProc:
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="20"
/>
Is there something else I missed??
look for code logic problems, cause it will fire - i promise!
also, you can force the event with SESSION.ABANDON method... and place a
break-point to debug the routine...
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message
news:p5******** ************@ne wssvr28.news.pr odigy.com... I print the value of the curUsers counter (along with another one that is supposed to keep track of the number of users that have ever visited the site) on the home page. The values of these two counters are ALWAYS equal and get reset at the same time (I've had both counters up to over 2000 before the application ended and each counter was reset to 0...because I have a Application_End () routine that is supposed to save the counter to a file -- and an accompanying Application_Sta rt() routine to read it in so that when the application starts again, I can start counting where I left off -- but never seems to fire either. The counter file is always set to 0).
"Kevin Spencer" <ke***@SPAMMERS SUCKtakempis.co m> wrote in message news:#A******** ******@tk2msftn gp13.phx.gbl... How do you know for sure that it NEVER fires? The Session_End Event happens usually some time after the user has closed their browser or navigated elsewhere. As the server has no idea what is happening on the client,
the Session ends 20 (by default, and according to your web.config file) minutes after the last Request from that user. So, again, are you sure it is
NEVER firing?
HTH,
Kevin Spencer Microsoft FrontPage MVP Internet Developer http://www.takempis.com Some things just happen. Everything else occurs.
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message news:yL******** ************@ne wssvr28.news.pr odigy.com... I've got an ASP.NET page with a counter subtraction routine in the Session_End method in the Global.asax.cs:
protected void Session_End(Obj ect sender, EventArgs e)
{
ulong curUsers;
Application.Loc k();
curUsers = (ulong)Applicat ion["curUsers"];
curUsers--;
Application["iCurUsers"] = curUsers;
Application.UnL ock();
}
Basically, this is supposed to keep track of the number of users that are logged into the system by keeping track of the number of open sessions -- except that the Session_End NEVER fires. I've checked my web.config file and it does show the mode as InProc:
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="20"
/>
Is there something else I missed??
No real error handling...but I've even gone so far as to put a
Session.Abandon () call in my code-behind file...and it STILL does not end.
Here're the particulars:
From my home.aspx.cs file:
private void Page_Load(objec t sender, System.EventArg s e)
{
orgLog myLog = (orgLog)Applica tion["orgLog"];
myLog.WriteLine ( "Testing" );
Session.Abandon ();
}
From my global.asax.cs file:
protected void Session_Start(O bject sender, EventArgs e)
{
orgLog LogFile;
Application.Loc k();
LogFile = (orgLog)Applica tion["orgLog"];
Application.UnL ock();
Session["IPADDR"] = "19.19.19.1 9"; // just used to store something in the
session
LogFile.WriteLi ne( ":: Session Begins for " +
Request.ServerV ariables["REMOTE_ADD R"].ToString() );
}
protected void Session_End(Obj ect sender, EventArgs e)
{
orgLog LogFile;
Application.Loc k();
LogFile = (orgLog)Applica tion["orgLog"];
Application.UnL ock();
LogFile.WriteLi ne( ":: Session Ends for " +
Request.ServerV ariables["REMOTE_ADD R"].ToString() );
}
// orgLog is a home made information logging tool (it creates a log file).
I'd think that maybe the problem is here, but I can log to it over and over
without difficulty..
From the Log File:
[7/9/2003 4:10:37 PM] == Application Starts ==
[7/9/2003 4:10:38 PM] :: Session Begins for 127.0.0.1
[7/9/2003 4:10:38 PM] Testing
[7/9/2003 4:25:25 PM] == Application Starts ==
[7/9/2003 4:25:25 PM] :: Session Begins for 127.0.0.1
[7/9/2003 4:25:25 PM] Testing
[7/9/2003 4:30:27 PM] :: Session Begins for 127.0.0.1
[7/9/2003 4:30:27 PM] Testing
[7/9/2003 4:30:28 PM] :: Session Begins for 127.0.0.1
[7/9/2003 4:30:28 PM] Testing
Notice that I'm getting a new Session for each iteration (I'm not sure why)
but I'm never getting a Session_End...
If anyone notices anything out of place, please let me know. I've got my
session timeout set to 1, so I should be getting the session_end after a
minute...but I just seem to be getting a new session without the old session
ever ending...
"Kevin Spencer" <ke***@SPAMMERS SUCKtakempis.co m> wrote in message
news:Ol******** ******@TK2MSFTN GP10.phx.gbl... What sort of error-handling are you implementing for this? It sounds like
an error may be aborting the process somewhere.
HTH,
Kevin Spencer Microsoft FrontPage MVP Internet Developer http://www.takempis.com Some things just happen. Everything else occurs.
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message news:p5******** ************@ne wssvr28.news.pr odigy.com... I print the value of the curUsers counter (along with another one that
is supposed to keep track of the number of users that have ever visited the site) on the home page. The values of these two counters are ALWAYS
equal and get reset at the same time (I've had both counters up to over 2000 before the application ended and each counter was reset to 0...because I have a Application_End () routine that is supposed to save the counter to
a file -- and an accompanying Application_Sta rt() routine to read it in so that when the application starts again, I can start counting where I
left off -- but never seems to fire either. The counter file is always set
to 0).
"Kevin Spencer" <ke***@SPAMMERS SUCKtakempis.co m> wrote in message news:#A******** ******@tk2msftn gp13.phx.gbl... How do you know for sure that it NEVER fires? The Session_End Event happens usually some time after the user has closed their browser or navigated elsewhere. As the server has no idea what is happening on the client, the Session ends 20 (by default, and according to your web.config file) minutes after the last Request from that user. So, again, are you sure it is NEVER firing?
HTH,
Kevin Spencer Microsoft FrontPage MVP Internet Developer http://www.takempis.com Some things just happen. Everything else occurs.
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message news:yL******** ************@ne wssvr28.news.pr odigy.com... > I've got an ASP.NET page with a counter subtraction routine in the > Session_End method in the Global.asax.cs: > > protected void Session_End(Obj ect sender, EventArgs e) > > { > > ulong curUsers; > > Application.Loc k(); > > curUsers = (ulong)Applicat ion["curUsers"]; > > curUsers--; > > Application["iCurUsers"] = curUsers; > > Application.UnL ock(); > > } > > Basically, this is supposed to keep track of the number of users
that are > logged into the system by keeping track of the number of open sessions -- > except that the Session_End NEVER fires. I've checked my web.config file > and it does show the mode as InProc: > > <sessionState > > mode="InProc" > > stateConnection String="tcpip=1 27.0.0.1:42424" > > sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes" > > cookieless="fal se" > > timeout="20" > > /> > > Is there something else I missed?? > >
Actually, I DO know why...the added Session.Abandon ()...but it still never
goes to Session_End...
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message
news:x_******** ************@ne wssvr28.news.pr odigy.com... No real error handling...but I've even gone so far as to put a Session.Abandon () call in my code-behind file...and it STILL does not end. Here're the particulars:
From my home.aspx.cs file: private void Page_Load(objec t sender, System.EventArg s e)
{
orgLog myLog = (orgLog)Applica tion["orgLog"];
myLog.WriteLine ( "Testing" );
Session.Abandon ();
}
From my global.asax.cs file: protected void Session_Start(O bject sender, EventArgs e)
{
orgLog LogFile;
Application.Loc k();
LogFile = (orgLog)Applica tion["orgLog"];
Application.UnL ock();
Session["IPADDR"] = "19.19.19.1 9"; // just used to store something in the session
LogFile.WriteLi ne( ":: Session Begins for " + Request.ServerV ariables["REMOTE_ADD R"].ToString() );
}
protected void Session_End(Obj ect sender, EventArgs e)
{
orgLog LogFile;
Application.Loc k();
LogFile = (orgLog)Applica tion["orgLog"];
Application.UnL ock();
LogFile.WriteLi ne( ":: Session Ends for " + Request.ServerV ariables["REMOTE_ADD R"].ToString() );
}
// orgLog is a home made information logging tool (it creates a log file). I'd think that maybe the problem is here, but I can log to it over and
over without difficulty..
From the Log File:
[7/9/2003 4:10:37 PM] == Application Starts == [7/9/2003 4:10:38 PM] :: Session Begins for 127.0.0.1 [7/9/2003 4:10:38 PM] Testing [7/9/2003 4:25:25 PM] == Application Starts == [7/9/2003 4:25:25 PM] :: Session Begins for 127.0.0.1 [7/9/2003 4:25:25 PM] Testing [7/9/2003 4:30:27 PM] :: Session Begins for 127.0.0.1 [7/9/2003 4:30:27 PM] Testing [7/9/2003 4:30:28 PM] :: Session Begins for 127.0.0.1 [7/9/2003 4:30:28 PM] Testing
Notice that I'm getting a new Session for each iteration (I'm not sure
why) but I'm never getting a Session_End...
If anyone notices anything out of place, please let me know. I've got my session timeout set to 1, so I should be getting the session_end after a minute...but I just seem to be getting a new session without the old
session ever ending...
"Kevin Spencer" <ke***@SPAMMERS SUCKtakempis.co m> wrote in message news:Ol******** ******@TK2MSFTN GP10.phx.gbl... What sort of error-handling are you implementing for this? It sounds
like an error may be aborting the process somewhere.
HTH,
Kevin Spencer Microsoft FrontPage MVP Internet Developer http://www.takempis.com Some things just happen. Everything else occurs.
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message news:p5******** ************@ne wssvr28.news.pr odigy.com... I print the value of the curUsers counter (along with another one that is supposed to keep track of the number of users that have ever visited
the site) on the home page. The values of these two counters are ALWAYS equal and get reset at the same time (I've had both counters up to over 2000 before the application ended and each counter was reset to 0...because
I have a Application_End () routine that is supposed to save the counter
to a file -- and an accompanying Application_Sta rt() routine to read it in
so that when the application starts again, I can start counting where I
left off -- but never seems to fire either. The counter file is always set to 0).
"Kevin Spencer" <ke***@SPAMMERS SUCKtakempis.co m> wrote in message news:#A******** ******@tk2msftn gp13.phx.gbl... > How do you know for sure that it NEVER fires? The Session_End Event happens > usually some time after the user has closed their browser or
navigated > elsewhere. As the server has no idea what is happening on the
client, the > Session ends 20 (by default, and according to your web.config file) minutes > after the last Request from that user. So, again, are you sure it is NEVER > firing? > > HTH, > > Kevin Spencer > Microsoft FrontPage MVP > Internet Developer > http://www.takempis.com > Some things just happen. > Everything else occurs. > > "Kenn Ghannon" <ke****@amerite ch.net> wrote in message > news:yL******** ************@ne wssvr28.news.pr odigy.com... > > I've got an ASP.NET page with a counter subtraction routine in the > > Session_End method in the Global.asax.cs: > > > > protected void Session_End(Obj ect sender, EventArgs e) > > > > { > > > > ulong curUsers; > > > > Application.Loc k(); > > > > curUsers = (ulong)Applicat ion["curUsers"]; > > > > curUsers--; > > > > Application["iCurUsers"] = curUsers; > > > > Application.UnL ock(); > > > > } > > > > Basically, this is supposed to keep track of the number of users that are > > logged into the system by keeping track of the number of open sessions -- > > except that the Session_End NEVER fires. I've checked my
web.config file > > and it does show the mode as InProc: > > > > <sessionState > > > > mode="InProc" > > > > stateConnection String="tcpip=1 27.0.0.1:42424" > > > > sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes" > > > > cookieless="fal se" > > > > timeout="20" > > > > /> > > > > Is there something else I missed?? > > > > > >
Of course the Request object is invalid on Session_End! The Session ends
AFTER the last Request has been processed!
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP http://www.takempis.com
Big things are made up
of lots of little things
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message
news:Wa******** ************@ne wssvr28.news.pr odigy.com... Please excuse me for being a freaking newbie. :) I didn't know that you could debug the global.asax.cs file...
Turns out that the Request object is no longer valid during Session_End
(It says there's an HTML Exception when doing a 'Watch' of the Request
object -- but I'm not doing anything weird and I've walked it until the session
timed out -- and the Request object was valid when the page rendered and wasn't when it came back to Session_End...
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message news:yL******** ************@ne wssvr28.news.pr odigy.com... I've got an ASP.NET page with a counter subtraction routine in the Session_End method in the Global.asax.cs:
protected void Session_End(Obj ect sender, EventArgs e)
{
ulong curUsers;
Application.Loc k();
curUsers = (ulong)Applicat ion["curUsers"];
curUsers--;
Application["iCurUsers"] = curUsers;
Application.UnL ock();
}
Basically, this is supposed to keep track of the number of users that
are logged into the system by keeping track of the number of open
sessions -- except that the Session_End NEVER fires. I've checked my web.config
file and it does show the mode as InProc:
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="20"
/>
Is there something else I missed??
BTW, using some try/catch blocks in your code would have helped you debug a
good bit. For example, you could have the app write an Event Log entry with
a Stack Trace and the error details when an error occurs. That way you would
know exactly where any error occurs.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP http://www.takempis.com
Big things are made up
of lots of little things
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message
news:Wa******** ************@ne wssvr28.news.pr odigy.com... Please excuse me for being a freaking newbie. :) I didn't know that you could debug the global.asax.cs file...
Turns out that the Request object is no longer valid during Session_End
(It says there's an HTML Exception when doing a 'Watch' of the Request
object -- but I'm not doing anything weird and I've walked it until the session
timed out -- and the Request object was valid when the page rendered and wasn't when it came back to Session_End...
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message news:yL******** ************@ne wssvr28.news.pr odigy.com... I've got an ASP.NET page with a counter subtraction routine in the Session_End method in the Global.asax.cs:
protected void Session_End(Obj ect sender, EventArgs e)
{
ulong curUsers;
Application.Loc k();
curUsers = (ulong)Applicat ion["curUsers"];
curUsers--;
Application["iCurUsers"] = curUsers;
Application.UnL ock();
}
Basically, this is supposed to keep track of the number of users that
are logged into the system by keeping track of the number of open
sessions -- except that the Session_End NEVER fires. I've checked my web.config
file and it does show the mode as InProc:
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="20"
/>
Is there something else I missed??
You're right...but my development machine is not going to be where the app
finally resides and I don't have access to the Event log of that server --
so I've been trying to make do without using traces...
"Kevin Spencer" <ke************ *****@takempis. com> wrote in message
news:eW******** ******@TK2MSFTN GP11.phx.gbl... BTW, using some try/catch blocks in your code would have helped you debug
a good bit. For example, you could have the app write an Event Log entry
with a Stack Trace and the error details when an error occurs. That way you
would know exactly where any error occurs.
-- HTH,
Kevin Spencer .Net Developer Microsoft MVP http://www.takempis.com Big things are made up of lots of little things
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message news:Wa******** ************@ne wssvr28.news.pr odigy.com... Please excuse me for being a freaking newbie. :) I didn't know that
you could debug the global.asax.cs file...
Turns out that the Request object is no longer valid during Session_End (It says there's an HTML Exception when doing a 'Watch' of the Request object -- but I'm not doing anything weird and I've walked it until the session timed out -- and the Request object was valid when the page rendered and
wasn't when it came back to Session_End...
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message news:yL******** ************@ne wssvr28.news.pr odigy.com... I've got an ASP.NET page with a counter subtraction routine in the Session_End method in the Global.asax.cs:
protected void Session_End(Obj ect sender, EventArgs e)
{
ulong curUsers;
Application.Loc k();
curUsers = (ulong)Applicat ion["curUsers"];
curUsers--;
Application["iCurUsers"] = curUsers;
Application.UnL ock();
}
Basically, this is supposed to keep track of the number of users that are logged into the system by keeping track of the number of open sessions -- except that the Session_End NEVER fires. I've checked my web.config file and it does show the mode as InProc:
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="20"
/>
Is there something else I missed??
Well, what you can do is write a global Error Handler method that all of
your outermost try/catch blocks use. Then you can change the implementation
of that Error Handler whenever you feel that it is appropriate for the
platform you're running the app on. In any case, it's a good idea to have
some kind of "graceful" error-handling in whatever situation you're in.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP http://www.takempis.com
Big things are made up
of lots of little things
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message
news:an******** ************@ne wssvr28.news.pr odigy.com... You're right...but my development machine is not going to be where the app finally resides and I don't have access to the Event log of that server -- so I've been trying to make do without using traces...
"Kevin Spencer" <ke************ *****@takempis. com> wrote in message news:eW******** ******@TK2MSFTN GP11.phx.gbl... BTW, using some try/catch blocks in your code would have helped you
debug a good bit. For example, you could have the app write an Event Log entry with a Stack Trace and the error details when an error occurs. That way you would know exactly where any error occurs.
-- HTH,
Kevin Spencer .Net Developer Microsoft MVP http://www.takempis.com Big things are made up of lots of little things
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message news:Wa******** ************@ne wssvr28.news.pr odigy.com... Please excuse me for being a freaking newbie. :) I didn't know that you could debug the global.asax.cs file...
Turns out that the Request object is no longer valid during
Session_End (It says there's an HTML Exception when doing a 'Watch' of the Request object -- but I'm not doing anything weird and I've walked it until the session timed out -- and the Request object was valid when the page rendered and wasn't when it came back to Session_End...
"Kenn Ghannon" <ke****@amerite ch.net> wrote in message news:yL******** ************@ne wssvr28.news.pr odigy.com... > I've got an ASP.NET page with a counter subtraction routine in the > Session_End method in the Global.asax.cs: > > protected void Session_End(Obj ect sender, EventArgs e) > > { > > ulong curUsers; > > Application.Loc k(); > > curUsers = (ulong)Applicat ion["curUsers"]; > > curUsers--; > > Application["iCurUsers"] = curUsers; > > Application.UnL ock(); > > } > > Basically, this is supposed to keep track of the number of users
that are > logged into the system by keeping track of the number of open sessions -- > except that the Session_End NEVER fires. I've checked my web.config file > and it does show the mode as InProc: > > <sessionState > > mode="InProc" > > stateConnection String="tcpip=1 27.0.0.1:42424" > > sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes" > > cookieless="fal se" > > timeout="20" > > /> > > Is there something else I missed?? > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bonj |
last post by:
Hi
I have an ASP.NET application which implements a server-side charting
solution, for this it needs to generate .gif files which are then sent to
the browser via a literal which has its text set to "<img src=\" +
graphfilename + \"/>. This is all working beautifully, however all these
..gif files are going to build up on the server and are going to need
deleting. I tried putting some code in the Session_End function in
global.asax, but...
|
by: JezB |
last post by:
Why is my Session_End event in global.asax never firing ? I've tried
fiddling with the timeouts but still nothing.
Ideally I want to do some processing whenever someone leaves my web
application (navigates somewhere else or closes the browser).
|
by: Guadala Harry |
last post by:
Just wondering if Session_End *always fires* for every Session. I know that
IIS times out sessions after a default 20 min (unless changed) and there's
no way to know when a user actually closed a browser (unless I provide a
"log out" button that kills the session explicitly, and we can't guarantee
the user will click on that). What I am wondering if there are there
well-known/documented circumstances under which Session_End will NOT fire...
|
by: Lars Netzel |
last post by:
In Global asax the Session_End Sub fires off every now and then. I only want
it to fire when I call Session.Abandon() but it fires off totally randon
when just suring around in my ASP.NET solution. Does anyone have any ideas
abotu this why it happens?
best regards/
Lars Netzel
|
by: =?Utf-8?B?YnJlbnQ5NjA=?= |
last post by:
Environment: ASP.NET 2.0, SQL Server 2005, C#, Visual Studio 2005
In my Session_End event, I am executing a stored procedure to update a
database table that is used to log user sessions.
When the user sessions time out, the Session_End event fires successfully.
The stored procedure executes successfully, and I can see the updated data in
the database just as I would expect.
Nonetheless, an exception is being generated by the code...
| |
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= |
last post by:
Hi. I am trying to maintain a list of people who are currently "online" in
SQL. I do this by adding a simple entry to a simple PeopleOnline table
whenever someone logs in to my site.
If they manually log OUT of the site, I have no problem deleting them from
the PeopleOnline table. But if they just close the browser, I was assuming
I'd have to use the Session_End() event in Global.asax even though I know
that this will only occur once the...
|
by: Mufasa |
last post by:
I have code in my session_start to create a temp directory for the session.
On session_end it is supposed to delete the directory but doesn't seem to be
firing.
I've enclosed the code below.
Can anybody give me any suggestions as to why Session_End seems to not be
being fired?
TIA - J.
|
by: Ron J |
last post by:
I would like to keep track of users when they are 'on'. On Session_Start I
can write a DB record about them, but there does not seem to be session
variable information during the Session_end event which I could use to
update the record that they are logged out. This would also be nice to limit
multiple logins.
Is there a preferred way to track users login / logout /session time and
multiple logins ?
TIA
|
by: vickyl |
last post by:
Hi,
I've been having this problem for the pas few days so i thought i'd post and see if anyone could help.
I have an application that has code to delete file in Session_end. When i start a session and then do nothing in the browser for the timeout amount of time, session_end fires and the code works....the files get deleted. However, if i close the browser and wait the same amount of time (or longer) Session_End never fires. I know that...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |