|
I'd like to set the timeout on a specific Session Variable in a .Net web application, but leave other Session variables alone. Is this possible?
Example:
I have 5 Session Variables
Session(var1) Session(var2) Session(var3) Session(var4) Session(var5)
...
Started by Eppz on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You may implement this feature by creating in your code (update it per hit, and remove it from... .
The Caching framework of asp.net and change when they are flushed from the session.
You would need to use an alternative to Session for storage.
|
|
I'm using session_cache_limiter() and session_cache_expire() at the top of my PHP 5.1.0 script, just before my session_start().
From PHP help:
[...] you need to call session_cache_limiter() for every request (and before session_start() is called).
But...
Started by AlexV on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Example taken straight from "PHP: session_cache_limiter" off php.net
<?php /* set the cache limiter to 'private' */ session_cache_limiter('private'); $cache_limiter = session_cache_limiter(); echo definition of work , the functions....
|
|
I just installed PHP 5.3 and am weeding out consequent " deprecated " warnings.
It says session_unregister() is deprecated in:
session_unregister($serverWideUniqueIdCode);
and the replacement seems to be $_SESSION[].
So what would be the syntax with $...
Started by Edward Tanguay on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
To remove an entry from an array....
SESSION = array();
Quoting the doc (take a look at that page, it says quite some interesting stuff ;-) ) :
session_unregister() unregisters the global variable named name from the current session.
|
Ask your Facebook Friends
|
I'd like to create an administrative page to show that our use of session state isn't getting out of hand.
Is it possible to retrieve a list of all active sessions, and if so, how can I access all of the session data in each session?
Started by Bob on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Also by persisting the session state....
However by implementing membership provider you could know if a session is active and many other useful information about user's activities.
Session's cant be accessed from another session.
|
|
I would need to access to Session variables on Session_End event in global.asax.cs, but HttpContext.Current is null, so none of the session varables are accessible.
a) Can I access user session somehow differently, or
b) Is there any other event jut before...
Started by the berserker on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I don't believe there is any reliable way to capture the end of a user's session....
Unless you are using Session_End for the specific purpose of taking actions when a session times out, relying on Session_End is not a good idea.
|
|
What are some strategies to manage number of sessions and eliminate unneeded sessions?
Or
How do I get to know that sessions are no longer needed?
Answer Snippets (Read the full thread at stackoverflow):
You can however configure the session timeout in web.xml as follows:
<session....
You really don't need to worry about it at all .
Again, unless you really really need it, stick with configuring the session handling out.
T-4947.html.
|
|
I read two MSDN articles on Session state modes in ASP .Net. 1 and 2 .
Both articles shows that 'In Process' session state mode is the only mode that supports the Session_OnEnd event. If the session state Mode is StateServer or SQLServer, then the Session...
Started by Neil on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
InProcess knows that Session is managed.
Messages across process/machine to signal the Session_OnEnd.
|
|
If a PHP session variable is stored on file (like it is by default) then let's say I store a user's name into a session variable...
$_SESSION['username'] = 'Jason Davis';
Now when a page is built, if I call $_SESSION['username'] 100 times in the process...
Started by jasondavis on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The file is only read when you call the session_start.
No, the session data is read when session_start is called and written when either the script runtime is ended or session_write_close is called.
|
|
I'm trying to use the built-in .NET session handling to share sessions across multiple ASP.NET applications. I can't use a custom session implementation.
I have multiple web servers, each with its own hostname, configured to point to the same codebase...
Started by Nate Cook on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The new out-of-process model....
Support problem.
Session should not be shared across different for sharing of session state from a storage location and to share it in server farms.
In a database to which all of your ASP.NET apps have access .
|
|
I have two apps that I'm trying to unify. One was written by me and another is a CMS I am using. My authentication happens in the one I coded and I'd like my CMS to know that information. The problem is that the CMS uses one session name, and my app uses...
Started by Rhyce on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
session_regenerate _id()
The manual explains this pretty well....
So instead of using session_name (in your pseudo code), use session_id.
You should use session_id , you can use it to set / get the session id (or name).
|