session

how to kill a application session when a browser window is closed ?

Hello Everyone, i have a problem. I am working on a chatting application. I want to kill the session if user closes the browser window without logging off. I used 'beforeunload' function but it also fires when a postback event is fired so it's not good for me. Please help if anyone have any idea about it. ...

Problems with ASP.NET State Service version; state service is 1.1, website is 3.5

Hi there, I have a ASP.NET 3.5 website running on Windows Server 2003 and I'm using the ASP.NET State Service to manage sessions. It will appear to be working then I regularly get an error saying my code needs to have version 2.0 of the State Service running to work (I think that's what it said, I've temporarily switched back to storing ...

Asp.net Session times out before FormsAuthentication

When the users login on my asp.net website (through FormsAuthentication), I store some information about them in the current session such as their UserId, FirstName and other very basic variables that I need frequently in various web pages. The problem is that even if the session timeout is set to be longer than the FormsAuthentication ...

shopping cart for non registered users

I am in the process of making a website that involves a shopping cart. There are two major requirements: The user experience guys want login/authentication to be the very last step in the entire work flow. The user gets to do all the shopping and is asked to login only at the time of checking out. The shopping cart shouldn't expire(n...

Do PHP sessions set any cookies?

I only manually set 1 cookie on my social network site, I do rely heavily on php sessions though and I am wondering if sessions set any cookies behind the scenes? I was just reading up on HttpOnly-cookies and I am just trying to figure out if I can use them any. ...

PHP: session.auto_start

I have two projects in the same server, their settings conflict in the "session.auto_start", related post. Can I have the session.auto_start "ON" despite the other project contains codes such as session_start()? ...

Session State Server and memory problems

We have an application that pulls back fairly large datatables and stores them in session (I know this is bad, i didnt design it this way). We are using the Session State Server and I have verfied that its working (the site relies heavily on session and I can work with it just fine). However, when we return a large datatable (~12MB), we ...

Hand over FBConnect Session from iPhone >> Backend Server?

Good afternoon, I have a quick 'top level' question regarding the usage of Facebook Connect in an iPhone app which is in fact powered by my own backend. Is it possible that the user does authenticate him/herself with fbconnect on the iphone and the app hands over the session identifier to my server in order to perform whatever I need to...

PHP: testing session

Why is the construction brittle? I tried "!empty ( get_original_passhash() )" as a condition, but it ignites the error that you cannot use the return value. if ( get_original_passhash () != '' ) { set_login_session ( get_original_passhash() ); }else print("Please, log in."); ...

session id cookie in gwt rpc

Assuming I'm rolling my own session code, what's the right way to generate a unique and secure session id cookie in java. Should I not be rolling my own but using something that's already been standardized? I'm using gwt and the google app-engine platform. How do I make sessions persist across browser/server restarts? ...

asp.net What to do if current session is null?

In my web app, I do something like this to read the session variables: if (HttpContext.Current.Session != null && HttpContext.Current.Session["MyVariable"] != null) { string myVariable= (string)HttpContext.Current.Session["MyVariable"]; } I understand why it's important to check why HttpContext.Current.Session["MyVariable"] is ...

Heavy sessions slowing website

Hi, I am programming in PHP mysql. I have recently got into OOP programming. So I need to serialize my objects and store them to SESSIONS. However I think the huge sessions are slowing down refreshing and loading of my webpages. Is there an alternative approach (than serializing deserializing) so that I can still share my objects from...

Can echo size of SESSION?

Hi, I dont know if my sessions are too big. Is there a way to see the size of a session. Thanks, Rahul ...

PHP: how to limit the number of session files?

I periodically remove the tmp out of session files. Apparently, I mismanage sessions because of the huge number of sessions. How do you manage your sessions, not their amount becoming too large? How do you make sure you do not make a new session if one exists? Command I have used, not sure how they really work: ob_start (); session_sa...

PHP: thumb-rules for sessions

I had to break my too complex project, about 100files, to small files. A problem is that it is still hard to see the logic, getting nice heap of session errors: `Cannot send session cookie - headers already sent by` How do you manage your session commands, such as "session-start" and "ob-end-flush"? Do you add them to the beginning an...

PHP Login System

I am creating a login system for a web application using PHP. My question is, is it safe to only store the user login information in the current session? For example, if a user named John logs in successfully to my site, can I just store $_SESSION['Username'] = 'John' and $_SESSION['LoggedIn'] = 1 then check that $_SESSION['LoggedIn'] ...

How to store WCF sessions so another application can access them

Hi I have an application that operations like this.. Client <----> Server <----> Monitor Web Site WCF is used for the communication and each client has its own session on the server. This is so callbacks can be used from the server to callback to the client. The objective is that a user on the "Monitor Website" can do the following: ...

$_SESSION variables being controlled by PHP configuration?

I commonly see people setting $_SESSION variables as $_SESSION['example']=$_REQUEST['something']; $example=$_SESSION['example']; is this redundant? I am currently working on a new server and $_SESSION['example']=$_REQUEST['something']; gives me access to $example without any extra code is this normal or a php configuration makin...

Django - Losing Auth Session

Hello, I am with some trouble in Django... After login I am losing auth session for some pages. If I access "accounts/login/","accounts/logout/",""accounts/register/" the session always will be there, but if I access different page I cant access the user variable. This is strange because I am using the same "base.html" for all pages ...

session persistant across browser/server restart using google app-engine

How do I make sessions persist across browser/server restarts? I'm using Google AppEngine. I'm getting a new session id everytime I restart my browser and/or server. String jSessionId=this.getThreadLocalRequest().getSession().getId(); End Goal The big win I'm shooting for is long lived anonymous accounts. For example, a user can do ac...