session

What is a reliable method to record votes from anonymous users, without allowing duplicates

First of all, I searched as best I could and read all SO questions that seem relevant, but nothing specifically answered this. This is not a duplicate, afaik. Obviously if anonymous voting on a website is allowed, there is no fool proof way to prevent someone voting more than once. However, I am wondering if someone with experience can...

PHP Session Confusion

Alright, I'm confused as hell. I have an object that I store in a session. I can add items to this object. Pretty simple so far. I initialize the object like this: $template = new Template($mysqli); $_SESSION['template'] = serialize($template); Now this should create a brand spanking new object and assign it to the session. I then hav...

Difference between session affinity and sticky session?

What is the difference between session affinity and sticky session in context of load balancing servers? ...

Session_End Alternatives

I have seen in some other questions that using Session_ End() in Global.asax.cs is not advised. This is because if you're not using the default Session handler, Session_End won't get called, correct? Is there any other cases where it won't get called? The big question is: If you can't depend on Session_End(), what do you do to determin...

Why Session_End event not raised when StateProvider is not InProc?

Hi, I'm asking this question out of curiosity. I noticed this in my global.asax void Session_End(object sender, EventArgs e) { // Code that runs when a session ends. // Note: The Session_End event is raised only when the sessionstate mode // is set to InProc in the Web.config file. If session mode is set to StateServer ...

Transparent user session over several sites (single sign-on + single sign-off)

I have several sites in different domains: example.com, example.org, mail.example.com and passport.example.org. All of the sites are having common look-and-feel and should share the same user base. And in such extreme case I still want all the sites to transparently (as much as possible) share user sessions with the following key proper...

Session and viewstate at facebook platform

I have an application in facebook platform (a trial application) and i am using session and viewstate in the code of the application and when incrementing the session value it doesn't feel with changes in sometimes, i mean that i store a number in session and on posting back i increment this session value numner with one and when get the...

C# - get propery name inside setter

I want to preserve a property between postbacks in an ASP.Net application. Currently doing this: public int MyIndex { get { return (int)Session[ToString() + "MyIndex"]; } } but would prefer something like: public int MyIndex { get { return (int)Sessio...

ASP.NET Authenticaion and Security with Session

I'm building an intranet ASP.net web application that unfortunately cannot use the built-in membership features because all the users and logins are stored on the company database. It will use Windows authentication and match against this. I'm planning to have my own "users" table in a separate database that will handle access privileg...

Session StateServer connection string issue

We implemented the session state server and deployed in local PC(windows xp) its working fine. WE deployed in windows server 2003 we got the issue in connection string. Any one help me. ...

Rails: How do I minimize DB hits here? Eager loading isn't applicable

Hi, this question is maybe a little specific, but I think it's interesting from a general pov also. In a Rails App users can subscribe to other users. When I show a list of users I have to check, if the current user has subscribed to the users in the list. If he has subscribed, I show the unsubscribe button and the other way around. B...

prevent $_SESSION vars from being on multiple domains on same server?

I am in the process of planning for a series of websites that will all point to the same server and share the same back end code, but have different domain names, different content, and look completely different. Here is my issue, say a user visits one website and adds something to the cart, then visits the other website. (which is actua...

jQuery, WCF and ASP.NET

Hi, Apologies if this is a dumb question. In previous ASP.NET projects, I've been using jQuery to communicate with an ASMX web service without a problem - including having the ability to enable interaction with the user's session state. I'm now dabbling in the world of Visual Studio 2010 and .NET 4.0 and I'm trying to do the same sort...

ASP.NET MVC how to implement link which returns to previous page?

Title said it all. Some context: I got a search mechanism - search view, search results view and a details view (which represents one item of results, like a formview in webforms). I want a link in details view, which would return user to search results view. Ideas: Just read about TempData, but i guess that wouldn't help, cause user...

Is there any relationship between anonymous session ( which enables temporary profile ) and …?

Hello, 1) Is there any relationship between anonymous session ( where random identifier is generated for anonymous user, which enables the use of temporary profiles for unknown users) and a Session state? 2) If anonymous user is authenticated we need to clear anonymous identifier so that MigrateAnonymous event won't fire again. Bu...

What encryption algorithm is best for encrypting session file on the server?

Possible Duplicate: What is the best way to encrypt a text file in C/C++? It may sound weird but there is a C++ web application (CGI). Every new request creates a new process. So in order to maintain session a text file will be created on the server which will contain info like sessionid, username, password, timestamp etc. This ...

Facebook session is expired even though I am logged in to facebook

Hi, I am using facebooker with rails and when I log in via facebook connect, for a new user registration ,I get a session expired when I retrieve details like first_name etc.. Note that when I browse to facebook.com I am logged in..But it seems like that my app has an old session. How do I fix this? ...

PHP Session with an Incomplete Object

I'm getting an error I don't know how to fix so I wondering if I could get some help. This is the error Fatal error: process_form() [<a href='function.process-form'>function.process-form</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;Template&quot; ...

How to display messages to the user after a POST + HTTP redirect

I’m using the PRG pattern to avoid multiple form submission. It has, however, a serious drawback — you cannot simply echo the confirmation message to the user (obviously, the user won’t see the page, he will be redirected to another one). What are the solutions to this problem? I know two of them, but none of them seems perfect. Use a...

ASP.NET: How to access Session from handler?

i'm trying to store some values in the Session from a Handler page, before i do a redirect to a WebForms page, that will pick up the Session values and pre-fill the WebForm: public class Handler : IHttpHandler { public void ProcessRequest(HttpContext context) { ... context.Session["StackOverflow"] = "overflowing"; ...