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
0
votes
6 answers

Different ways of storing data in session state

I have been asked up to come up with a state management strategy for a ASP .NET / MVC C# 3.5 web app I have chose to go with storing sessions on a state server - this will be a separate physical box. I am concerned about the time that would be…
Developer
  • 17,809
  • 26
  • 66
  • 92
0
votes
2 answers

How to maintain the flash data after redirecting from gmail for email verification

Here,I am doing email verification through gmail. When I click on verify link then it redirect to the intended page ,but fail to maintain the flash data.I want that if anyone click on the click then it goes the pages and after verification it shows…
0
votes
1 answer

Enabling/Disabling CSS based on Session value using MVC

I am rather new to MVC applications, and one thing I am trying to accomplish is enabling or disabling stylesheets based on a Session value. I have stylesheets referenced in my Site.Master page in this manner: <%=Html.Stylesheet("~/styles/main.css",…
kronkk
  • 28
  • 3
0
votes
0 answers

Page and Session and Application events fired after Response.Redirect

After Response.Redirect("~/somedir/somepage.aspx") What are the events which are fired at page level,session level and application level? As far as I know there is one event Application_EndRequest which is fired at the end and this event's handler…
Alex
  • 15
  • 5
0
votes
0 answers

HTTP session tracking through base URL "resource"?

A little background: We're currently trying try specify an HTTP API between a couple of vendors so that different products can easily inter operate. We're not writing any "server" software yet, nor any client, but just laying out the basics of the…
Martin Ba
  • 37,187
  • 33
  • 183
  • 337
0
votes
0 answers

Store object for each user

I have an object which is holding the state for specific user... I need this object to be aviable while the user in on one of the pages in my site. My question is, where to save this object? Database? => to many queries... To build the state object…
Grigory Ilizirov
  • 1,030
  • 1
  • 8
  • 26
0
votes
1 answer

Redirect after Session Timeout in MVC Action Filter

I have to redirect to home page after session timeout in mvc 5 application. I am using following code : public class SessionExpireAttribute : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext…
Manoj Nayak
  • 2,449
  • 9
  • 31
  • 53
0
votes
1 answer

Data not getting loaded in Jqgrid when session state is state server/outproc

I have an MVC 5 application. I have used Jqgrid at multiple places. Recently, we have decided to move from Inproc session state to Outproc/State Server session state. But, after migrating, data stopped getting loaded in my Jqgrid. I tried using the…
0
votes
2 answers

asp.net mvc session and membership authentication

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…
TomerMiz
  • 377
  • 1
  • 3
  • 13
0
votes
1 answer

Serialize a class with Linq expression properties for SQL Server Session State

I have a class which has some expression tree properties. when I try to serialize it using the serializable attribute in order to configure SQL Server Session State, I have got the following error: ..Unable to serialize the session state,…
D.B
  • 4,009
  • 14
  • 46
  • 83
0
votes
1 answer

How to enable SessionStateTempDataProvider via Web.config?

I've deployed an MVC application to a web server and noticed on one of my buttons that it throws a SessionStateTempDataProvider class requires session state to be enabled. error. The error explains a lot, that I need to enable SessionStateModule and…
Brian Var
  • 6,029
  • 25
  • 114
  • 212
0
votes
1 answer

Session is transparent from user

Can anyone tell me what is the meaning of "Session is transparent from user.". I want to know that how Session transparent from user.
Mohit Kumar
  • 1,885
  • 5
  • 21
  • 24
0
votes
0 answers

what is "cryptographically secure page or form nonce in a hidden form field" in ASP.net?

I am learning about the securities which can be provided to ASP.net web applications. I came cross the terms "cryptography" and "nonce" which can provide security in session management. Kindly help me to know more about this.
Indira Pranoi
  • 67
  • 1
  • 2
  • 14
0
votes
1 answer

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…
Mike M. Lin
  • 9,992
  • 12
  • 53
  • 62
0
votes
1 answer

ASP.NET/MVC5 timeout configuration being ignored

I have been trying to set my web application session-timeout to 90 minutes without success. In my web.config I have it set as follow:
1 2 3
99
100