session

How do I set/get a cookie in django that is available if user is logged in AND logged out

I understand request.sessions dictionary and how to use this. However, it appears that values set using request.sessions is only valid while the user is logged in. I need to set a persistent cookie that lasts for a fixed time period and not dependent on whether the user is logged in or not. What I would like is to store a value for...

RavenDB ASP.NET session provider?

A little background: I currently make use of Memcached Providers for managing session state in my ASP.NET application. It provides facilities for using SQL Server as a fallback storage mechanism (when sessions need to be purged from the memcached cache). I'd like to look at creating a provider for RavenDB as it would be much more perform...

How to merge two MVC systems in PHP?

I am working with two MVC systems that need merged. It appears both use different session variables and different cookies. The main problem I have is trying to get each one to pass sessions variables back and forth, which it does not want to do. What is the best way to go about merging the two? Update: I am trying BlueImp chat with ano...

JSP page and Servlet reporting different session IDs

I'm setting a bean with some data in a JSP page, but then in my servlet when I try to access the value, I get a null value back. I printed the session IDs in both pages and I'm getting different values. Does anyone know what might be happening? Thanks. ...

httperf for load testing and validating response

I want to load test a site with httperf. But this is not for performance testing. It is to reproduce a random bug where sessions are not maintained correctly and content generated by users are swapped. Can i use httperf to make simultaneous post requests and verify the response/results of the post are consistent? ...

PHP session ID not sticking in Safari

What reasons could there be for PHP to provide a new session ID to a Safari browser at absolutely random intervals? Could the PHPSESSID cookie be expiring in the client? Or maybe something else, more complex? ...

Pass session from jsp to asp.net

My website login page is in jsp & some of modules in .net , So i want pass the session to .aspx page so that access those module Thanks in advance ...

How to stop basepage from recursivly detecting session timeout

Alternate Title: How to redirect on session timeout FINAL SOLUTION: Credit to: Robin Day (Although I tested Ben's solution and it also works and the other two solutions are also both good solutions) I got rid of the basepage that I had originally. Put this in the Session_Start of Global.asax void Session_Start(object sender, EventArg...

Checking if Session has Timed Out

This is my base class for all pages except EndSession.aspx override protected void OnInit(EventArgs e) { base.OnInit(e); if (Context.Session != null) { //check the IsNewSession value, this will tell us if the session has been reset. //IsNewSession will also let us know if the users session has timed ou...

NHibernate Session.SetReadOnly

I'm facing the same issue others already posted on SO: On reading objects from the database, NHibernate would update all the objects because the value of one field is not proper in the DB. (In detail: A newly added date column contains "1/1/0001" in all rows, so on mapping, NHibernate replaces the date and, on tx.Commit(), updates every...

Best way to persist session variables on listview itemcommand ASP.NET

As the itemcommand event fires after most if not all page/control init/load events. what is the best way to persist session variable data that is modified on itemcomment (adding items for example) so that the page can react to the itemcommand using the modified session? ...

Access active sessions in PHP

How can I get a list of all active PHP sessions on a server and access them from within one user's instance? The motivating case is displaying a list of all currently active users on the site, where usernames are stored in each user's PHP session. Note: I know that I can create my own state via a database (or even the filesystem), but ...

Starting global session to all pages.

How can i start a session in PHP which will be global to all my pages. I don't have access to the php.ini file. So session.auto_start = 0 in my php.ini will not be a solution for me. Thanks. ...

How do I maintain session in windows forms?

I want to maintain session on a windows application. How do I maintain the session of a user like we use in as.net to track the user information? ...

Persisting a shopping cart in Ruby on Rails

Currently developing a shopping cart, the options for persisting the cart, as i see them are: Store the entire cart object in a sessions table. Store the entire cart object in a cookie session. Have a cart table, and store the cart id in a cookie session. Have i missed any? which is the best to roll with please? Thanks ...

ASP.NET MVC forces an AJAX request be redirected to the login page when the FormsLogin session is no longer active

I have some AJAX calls that render PartialViewResults via the jQuery.AJAX method. This works great, I get my views rendered exactly the way I want. The problem arises when I leave the page up for a while and the Forms auth session expires. When I click an action that performs an AJAX request, it shows the login page in my div. I want ...

Setting a cookie in an AJAX request?

Hi, I'm validating a login form with jQuery AJAX call to PHP. In php, I create a session and if they checked the 'remember me' checkbox, I want to create a cookie. Here's the php code: <?php include '../includes/connection.php'; date_default_timezone_set('GMT'); $name = $_POST['username']; $pass = $_POST['password']; $query = mysql_...

Confused by PHP session problem (Rackspace)

My PHP session fluctuates between different values for no apparent reason. here is my test code that proves it: <?php //test.php ini_set('display_errors',1); error_reporting(E_ALL|E_STRICT); session_start(); print_r($_SESSION); ?> When I refresh that test.php, the $_SESSION has different values (about 3 different arrays in total),...

Facebook Graph sessions question..

I am curious as to how sessions/the graph work. I got the example code off the php sdk and have finally got it working. So i connect to facebook, the user authorizes the app, it redirects to my website, and i put the users facebook id into my database. The users actions can then be posted onto fb. When i then try in Internet Explorer ...

Android: log into website and preserve session/cookie using DefaultHttpClient

Hi, I've been through different tutorials and this website, but couldn't find a proper solution. On the other hand, I've seen apps logging into websites and requesting further information, so I'm sure there's a way to get this working, but maybe my approach is all wrong. Here's what I'm trying to do: I want to log into a website that n...