1,000 users log in for entering data.
Which is the best way to clean up after each user? How do I end a
session properly when an explicit logout is not an option?
If the user just closes the browser will my IIS clean up
automatically, or ought I to do something explicit?
If no Session Timeout is set, is the session then infinite?
As you may see, I'm somewhat confused. :-)
Regards /Snedker 6 1243
Which is the best way to clean up after each user? How do I end a
session properly when an explicit logout is not an option?
If you want code to run then add it to the Session_End event in the
global.asax file.
If the user just closes the browser will my IIS clean up
automatically, or ought I to do something explicit?
After the session timeout, IIS will destroy the session for you and call the
Session_End event.
If no Session Timeout is set, is the session then infinite?
No, there is always a timeout. Think it defaults to 20 mins if you don't
change it.
Yep. That about sums it up.
Just a silly point for completion. You can set the Session never to time
out: but that would be a bit daft in my view.
You might also want to ensure that the Session Timeout and any Authorisation
Cookie timeout are set to the same value. By default, one of them is 20
mins, and the other is 10 IIRC, which doesn't make a lot of sense to me.
HTH
Peter
"Aidy" <ai**@noemail.xxxa.comwrote in message
news:eK*********************@bt.com...
>Which is the best way to clean up after each user? How do I end a session properly when an explicit logout is not an option?
If you want code to run then add it to the Session_End event in the
global.asax file.
>If the user just closes the browser will my IIS clean up automatically, or ought I to do something explicit?
After the session timeout, IIS will destroy the session for you and call
the Session_End event.
>If no Session Timeout is set, is the session then infinite?
No, there is always a timeout. Think it defaults to 20 mins if you don't
change it.
"Morten Snedker" <morten_spammenot_ATdbconsult.dkwrote in message
news:ff********************************@4ax.com...
If the user just closes the browser will my IIS clean up
automatically, or ought I to do something explicit?
Just to add to what Aidy and Peter have said, your webserver and all its
running software (IIS, ASP.NET etc) has no way of knowing if the user has
closed their browser, or has left your site...
You can try using JavaScript in the window.onunload event of your webpages,
but this is highly unreliable...
its common to want sessions to last days (think of a shopping cart or
wish lists). but authenication should timeout quicker.
note: only the inproc session manager fires the Session_End, which
should not be used for large production sites unless it just used for
caching (can recreate data if session lost).
-- bruce (sqlwork.com)
Peter Bradley wrote:
Yep. That about sums it up.
Just a silly point for completion. You can set the Session never to time
out: but that would be a bit daft in my view.
You might also want to ensure that the Session Timeout and any Authorisation
Cookie timeout are set to the same value. By default, one of them is 20
mins, and the other is 10 IIRC, which doesn't make a lot of sense to me.
HTH
Peter
"Aidy" <ai**@noemail.xxxa.comwrote in message
news:eK*********************@bt.com...
>>Which is the best way to clean up after each user? How do I end a session properly when an explicit logout is not an option?
If you want code to run then add it to the Session_End event in the global.asax file.
>>If the user just closes the browser will my IIS clean up automatically, or ought I to do something explicit?
After the session timeout, IIS will destroy the session for you and call the Session_End event.
>>If no Session Timeout is set, is the session then infinite?
No, there is always a timeout. Think it defaults to 20 mins if you don't change it.
Ah yes. Good point. It just shows how ones mind can run on rails and fail
to see what's on the other tracks.
OK. That's enough for that metaphor, but thanks again for broadening my
horizons. Nice one.
Peter
"bruce barker" <no****@nospam.comwrote in message
news:OY**************@TK2MSFTNGP02.phx.gbl...
its common to want sessions to last days (think of a shopping cart or wish
lists). but authenication should timeout quicker.
note: only the inproc session manager fires the Session_End, which should
not be used for large production sites unless it just used for caching
(can recreate data if session lost).
-- bruce (sqlwork.com)
Peter Bradley wrote:
>Yep. That about sums it up.
Just a silly point for completion. You can set the Session never to time out: but that would be a bit daft in my view.
You might also want to ensure that the Session Timeout and any Authorisation Cookie timeout are set to the same value. By default, one of them is 20 mins, and the other is 10 IIRC, which doesn't make a lot of sense to me.
HTH
Peter
"Aidy" <ai**@noemail.xxxa.comwrote in message news:eK*********************@bt.com...
>>>Which is the best way to clean up after each user? How do I end a session properly when an explicit logout is not an option? If you want code to run then add it to the Session_End event in the global.asax file.
If the user just closes the browser will my IIS clean up automatically, or ought I to do something explicit? After the session timeout, IIS will destroy the session for you and call the Session_End event.
If no Session Timeout is set, is the session then infinite? No, there is always a timeout. Think it defaults to 20 mins if you don't change it.
Yes. The most reliable way, of course, if you're using Forms
Authentication, is to use FormsAuthentication.SignOut.
Won't work if someone just closes their browser, of course, but it should
be used anywhere there's any kind of event that can be handled - even if
it's only Session_End.
:)
Peter
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
"Morten Snedker" <morten_spammenot_ATdbconsult.dkwrote in message
news:ff********************************@4ax.com...
>If the user just closes the browser will my IIS clean up automatically, or ought I to do something explicit?
Just to add to what Aidy and Peter have said, your webserver and all its
running software (IIS, ASP.NET etc) has no way of knowing if the user has
closed their browser, or has left your site...
You can try using JavaScript in the window.onunload event of your
webpages, but this is highly unreliable... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Damien |
last post by:
Hi to all,
I'm currently re-designing our intranet : nice and lean CSS2, cleaned-up
PHP 4.3.7, better-normalized MySQL ;o). So I've started using the
$_SESSION variable instead of register_globals...
|
by: mudge |
last post by:
I'm running PHP Version 4.3.10. I'm trying to make it so that when a
person logs in using a user name and password that their session is
valid and continues for a few months so they don't have to...
|
by: Al Jones |
last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate
group would you point me toward one that is.
Basically, I seem to be losing session data part way though preparing an...
|
by: Abhilash.k.m |
last post by:
This is regarding the session management using Out of
proc session management(SQL SERVER). Among the samples
below which one is better to set the session?
1. There are 20 session...
|
by: joseph conrad |
last post by:
Hi,
I tried to implement my own session handler in order to keep control on
the process
the drawback I foun it is not creating and storing in my cookie the
PHPSESSID variable anymore.
reading te...
|
by: aroraamit81 |
last post by:
Hi,
I am facing a trouble. I have some Session variables in my code and
somehow my session variables are getting mixed up with other users.
For example User A has access to 10 companies and...
|
by: aroraamit81 |
last post by:
Well Guys, Here is a very strange trouble. When more than one users
request tto same page at the same time then our session gets
conflicted.
Moreover I printed my SessionID, strangely but true I...
|
by: TRB_NV |
last post by:
I'd been using an Access database based shopping cart, but wanted to change
it so that it would use session variables. I have a form that's submitted
to a page called addtocart.asp that contains...
|
by: Santosh |
last post by:
Dear All
i am writting a code sending mail with attachement.
i am writting code for sending mail in one page and code for attaching
a file in the next page.
aftet attaching a file i am taking...
|
by: lyealain |
last post by:
<%
If Session("username") = "" Then
Response.Redirect("/CLS/Login.asp")
End If
Dim conn
Dim connectstr
Dim db_name, db_username, db_userpassword
Dim db_server
Dim res
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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,...
|
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...
|
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...
| |