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
1 answer

Spring Cloud Zuul + CAS5 causes 404

I have a requirement to run a Zuul gateway (Edge service) serving multiple OAuth2 and CAS secured applications. I have the applications working (Not shown) but have an issue with the third party App that is secured by CAS. The Zull routes are set…
CobraFlow
  • 150
  • 2
  • 9
0
votes
0 answers

How to get MemoryDistributedCache in scope of user Action?

We create MemoryDistributedCache instance in Statup.ConfigureServices using services.AddDistributedMemoryCache(); services.AddSession(); But how to access it scope of user action? E.g. administrator have changed user privileges and we should…
Roman Pokrovskij
  • 9,449
  • 21
  • 87
  • 142
0
votes
1 answer

Yii2: how can I make sure session is always started?

How can make sure session is always started in Yii2? In Yii 1.0 there seemed to be a configuratio parameter autoStart but I don't see that in Yii2. Do I need to manually call Yii::$app->session->open() (or session_start()), and if so, where is a…
TheStoryCoder
  • 3,403
  • 6
  • 34
  • 64
0
votes
0 answers

httpContext.Session lost value

i have a web site, which sometimes the Session lost the value. Here is what i do: In the Login ActionResult, in the Controller: private ActionResult Login(string user, string pass){ if (Membership.ValidateUser(user, pass)) { …
Mati Silver
  • 185
  • 1
  • 13
0
votes
0 answers

Session State C# Declaration Passing textbox.Text

Ok I have a fairly simple issue I want to define some session state variables So far in my code behind in C# for an aspx page I have the following type of declaration working fine in my index.aspx.cs file. Session[Constants.firstName] =…
0
votes
2 answers

How to best fix an InProc session state variable \ multi instance problem?

I've recently been tasked with fixing a rather nasty bug resulting from the misuse of session state. We have an asp.net web application that runs on a single sever using inproc session state. The basic design is that a typed dataset is loaded from…
NullReference
  • 4,404
  • 12
  • 53
  • 90
0
votes
1 answer

Does updating application pool advanced settings incur an automatic application pool recycle?

I just updated the Application Pool > Advanced Settings in IIS. I set Recycling.Regular Time Interval = 0 and clicked OK. After doing so I noticed Application Pool.Applications = 0. Previous to updating the advanced setting, Applications = 4. I then…
Adam
  • 1,932
  • 2
  • 32
  • 57
0
votes
3 answers

Laravel session flash message appears multiple times on pageback

In my controller: Session::flash('created', "Student created"); return Redirect::to('student'); In my view: @if(Session::has('created')) alert('updated'); @endif
Milan Suthar
  • 352
  • 1
  • 2
  • 17
0
votes
1 answer

Sessions not working as expected PHP

I have multiple sites on same server with small changes. Issue is that when User login into A site and from url if he enter B site, he is allow to view content. How I can restrict user to view B site content. Below if my authenication code function…
user1885057
  • 85
  • 1
  • 2
  • 12
0
votes
2 answers

How to extend the session time when session empty in ASP.Net MVC?

I need to extend the session timeout in MVC to maintain the user session. Tried to make session extend on Session_End in global.asax but it didn't worked.
padh
  • 95
  • 1
  • 3
  • 14
0
votes
2 answers

Object losing reference when assigning it to Session?

I am facing a very strange issue. I get an error Object Reference Not set to instance of object on the server while the code runs fine on my dev machine. The strange part is the line number where the code is throwing error (as appears in the Stack…
shashi
  • 4,616
  • 9
  • 50
  • 77
0
votes
0 answers

Redirect from 1 site to another bypassing the login page

I have to websites - A (written in C# using ASP.NET Web Forms) and B (written in VB using ASP.NET MVC4). Both websites are on different domains, require logging into and do not share the same database. I need to make sure that the users of website A…
0
votes
2 answers

ASP.NET State Server is hanging

I am using ASP.NET State Server, while using the website, following message occurs occasionally The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never…
bjan
  • 2,000
  • 7
  • 32
  • 64
0
votes
0 answers

Session is not persisting in some machine, while working fine in other machines

In my ASP.Net MVC application, I have stored some information in Session. When I am running the application locally, the session values are persisting but when I deploy that in to the server & trying to access the application is throwing Null…
Biki
  • 2,518
  • 8
  • 39
  • 53
0
votes
1 answer

How to allow people to edit multiple posts at the same time without overwriting each one?

I have a site where people can create posts and submit them (like on Stackoverflow and Facebook). One thing that the user can do is attach a photo before submitting the post. So as soon as the photo is attached (using AJAX), a new PostID is created…