session-state

ASP.Net State Server Fault Tolerance

Can a State server in ASP.Net be made fault tolerant? By that I mean is when one state server goes down, ASP.Net applications can switch to another state server. I do not want to go to a Database based state management as that seems considerably slower than the State Server. ...

Page.EnableSessionState equivalent in ASP.NET MVC

With ASP.NET WebForms it is possible to set the session state mode in the page directive: <%@ Page EnableSessionState="true|false|ReadOnly" %> Is the same configuration also possible in ASP.NET MVC (e.g. per controller or per action) and if so, how? (In other words: can I disable or set to read-only session state per controllers/acti...

Is Terracotta used professionally?

Today at work I had a discussion with my co-workers and my boss about stateless/stateful beans (we just finished a project using JSF, it was the first time anyone at this company did something JSF related) and my boss said that he doesn't really like Session scoped beans (or even conversation/KeepAlive scoped ones). One of his arguments ...

Session keeps timing out

My session keeps timing out in just a few minutes even though I've specified a 200 minute expiry. In my web.config I've set the timeout for the forms and the sessionState. I've looked at some other similar questions on Stack Overflow but still can't suss this. <authentication mode="Forms"> <forms loginUrl="~/Default.aspx" defaultUrl=...

IE8 does not keep Session Variables

If I host an ASP.NET page with: <%@ Page Language="C#" %> <!DOCTYPE html> <script runat="server"> protected void btn_Click(object sender, EventArgs e) { lbl.Text = HttpContext.Current.Session["a"] == null ? "null" : HttpContext.Current.Session["a"].ToString(); } prot...

Can AppFabric be the session state provider and use local cache?

I am using AppFabric as the session state provider in my ASP.Net MVC2 app, and I would like it to also use the local cache. I have the following entry in my web.config right after the configSections node: <dataCacheClient> <localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlVa...

A non-locking in-process ASP.NET session state store

I'm using ASP.NET's in-process session state store. It locks access to a session exclusively, and which means concurrent requests to the same session are served sequentially. I want to remove this implicit exclusive lock, so multiple requests per session can be handled concurrently. Of course, I'll be synchronizing access to the session...

can't get System.Web.SessionState with asp.net 4 webforms routing

I've seen couple of questions here such as http://stackoverflow.com/questions/161221/state-service-when-using-system-web-routing-in-webforms but couldn't find proper solution. I am using asp.net routing with webforms on iis7. I've added below to webconfig file to get it working at first palace <system.webServer><modules> ...

Program/IDE to save state of a running program and restore later

I have a simulator written in C++ which reads a file and processes it line by line. This is a time consuming process. I mostly run into rum time errors where the program crashes after 15-20 mins. I start debugging and the program takes the same amount of time to hit the break point I set . I examine a few variables and step through the c...

SessionState expired behaviour

Is it possible to control the behaviour of ASP.NET when the Session has expired? It seems that the default behaviour is sending the user to the website root. The desired effect would be to send the user to a custom "Session Expired" page. To clarify, it's the SessionState that's expiring (set the timeout to 1 minute to quickly test it):...

Problems with ASP.NET Session State / NInject / OnePerRequest behavior

This is quite a lengthy post, so bear with me. I'm not sure whether it is primarily about ASP.NET Session State behaviour, NInject, application design, or refactoring. Read on and then you can decide... :-) Background First, a bit of background. We are working on trying to refactor a large webshop into a more maintainable , structu...

how to unit test session state

I'm trying to figure out how to unit test my object that persists itself to session state. The controller does something like... [HttpPost] public ActionResult Update(Account a) { SessionManager sm = SessionManager.FromSessionState(HttpContext.Current.Session); if ( a.equals(sm.Account) ) sm.Acco...

Safely knowing you're logged in, without using sessions.

I heard in an old stackoverflow podcast that they minimized the use of sessions, and that they basically only needed it when posting. How can that be? Don't they need to use some form of sessions on every page view if nothing more than to tell that I'm logged in? How else do they show your username instead of the "Log In" prompt at th...

How do I synchronize state between PHP sessions?

I'm building a webapp. HTML+AJAX <--> PHP <--> MySQL; very traditional. What I need to do is have some state that all sessions can read from, and something that drives state changes even when there are no users looking at the site. A simple example would be a counter. We start the counter running from zero, and then whenever any use...

Session is transparent from user.

Hello Experts, Can anyone tell me what is the meaning of "Session is transparent from user.". I want to know that how Session transparent from user. ...

Accessing State in ASP.NET

Is System.Web.HttpContext.Current.Session the same as System.Web.UI.Page.Session ? Many thanks in advance. ...

asp.net mvc session and membership authentication

Hi All, New to MVC, worked a lot with asp.net but never used the built in membership , authentication, authorization stuff before. I have 2 questions: In the asp.net days i would store the logged in user details (username, first & last name, email) in a session (using a custom class) and just checked that the session["UserDetails"] !...

ASP.NET Session Performance

I'm experiencing performance issues on my asp.net application. Sometimes it would take the client 30-40 seconds to execute a command, where as in sometimes it would take 3-4 seconds. I tried SQL Profiler and I don't see any problems. I was not able to replicate the issue on my side, under the same scenario when the client was trying. I...

IIS, Session State and Virtual Directories

I've created a web site with ASP.NET 2.0 and I'm using a session variable to determine if a user has filled out an age verification form. Everything works as expected (I can read the session variable on all pages) until a user goes to a virtual directory. When they do so, the page can't read the session variable. After much research, I'...

Hibernate: Could not synchronize database state with session

While trying to insert a new entry to a Many TO Many associated table , i am getting this error: Could not synchronize database state with session I can understand that this is something deals with getSession() & session.close() But i cant able to figure it out exactly. For each transaction i am creating a new session. But i close all t...