Questions tagged [session-state]

Session-state allows the retrieval of values for a given user as that user navigates through a website. It is used to maintain state across a visit within the constraints of the stateless HTTP protocol. Session-state is commonly abbreviated to session.

ASP.NET session state supports several different storage options for session data. Each option is identified by a value in the SessionStateMode enumeration. The following list describes the available session state modes:

  • InProc mode, which stores session state in memory on the Web server. This is the default.
  • StateServer mode, which stores session state in a separate process called the ASP.NET state service. This ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm.
  • SQLServer mode stores session state in a SQL Server database. This ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm.
  • Custom mode, which enables you to specify a custom storage provider.
  • Off mode, which disables session state.

You can specify which mode you want ASP.NET session state to use by assigning a SessionStateMode enumeration values to the mode attribute of the sessionState element in your application's Web.config file. Modes other than InProc and Off require additional parameters, such as connection-string values as discussed later in this topic. You can view the currently selected session state by accessing the value of the HttpSessionState.Mode property.

Check more details in the follow link - Session-State Modes

1902 questions
21
votes
8 answers

ASP.NET Masters: What are the advantages / disadvantages of using Session variables?

I've done a search on this subject already, and have found the same data over and over-- a review of the three different types of sessions. (InProc, Sql, StateServer) However, my question is of a different nature. Specifically, what is the…
Micah
  • 10,295
  • 13
  • 66
  • 95
21
votes
2 answers

.NET HttpSessionState Case Insensitivity

.NET's HttpSessionState using an "InProc" store seems to treat session variable key values as case insensitive. For example: session["foo"] = 1; session["Foo"] = 2; Trace.Write(session["foo"].ToString()); // => 2 This behavior appears to be…
Alison R.
  • 4,204
  • 28
  • 33
20
votes
3 answers

how to find out if audio session is active in iOS

I'm using AudioSessionSetActive(true) and AudioSessionSetActive(false) for setting the AudioSession to true or false in my iOS app. At any point, I want to find out whether the session is active or not. Is there a way to do that?
Namratha
  • 16,630
  • 27
  • 90
  • 125
20
votes
3 answers

Asp.Net MVC and Session

I'd like to construct an object in different steps in an asp.net mvc application, each step being a different page. The sort of thing you'd store in Session in a quick Web.Forms application. Reading about it, Session doesn't seem to me as something…
antonioh
  • 2,924
  • 6
  • 26
  • 28
20
votes
4 answers

IE double postback hangs IIS 7 in Integrated Managed pipeline mode when session is accessed

Here's my environment: IIS7.5 on Win 7, .NET 4, App Pool Integrated web.config Test.aspx <%@ Page Language="C#" %>