FAQ Database Discussion Community


Is OnAuthorization called for every request?

asp.net-mvc,session-state
Question: Is OnAuthorization called for every request? If not, where can I check for session timeout before Authorize attributes are called? Background: I need a way to determine if session exists and has not timed out. I want to do this on every method call for every controller in my...

Looking for elaboration on how sessions are stored for high-traffic sites?

php,session,session-state
I've been trying to understand where PHP (or other languages, really, I suppose the principle is the same) keeps session data server-side. I read this question and this question, which both seem to indicate that it defaults to just creating ordinary files in the /tmp folder, files whose names match...

Change load-balanced server for Azure web site?

asp.net,azure,session-state,azure-web-sites
I have an ASP.NET Web App (not web role) deployed to Azure that's being load-balanced. I'm using Redis to handle shared Session data. I'd like to provide, for testing purposes, a way to trigger a page load to use a different server. The goal is to output the Server's local...

ASP.NET MVC Session State Timeout

c#,asp.net,asp.net-mvc,session,session-state
Given that session state is not reccomended in ASP.NET MVC. I'm trying to understand under what circumstances session is used. I know that using the TempData creates a session but what other circumstances are there and does it matter how I configure the session state timeout for better security? <sessionState...

View state data being lost on a back click in MVC

c#,ajax,session,model-view-controller,session-state
Question Background: I have a shopping cart system that allows people to update the amount of each item in the cart. This is made through an AJAX POST request from the ViewCartContents.cshtml View to a method on my controller called UpdateAllCartItems. All Items are kept in a list in a...

PHP HTTP 500 during same domain redirect

php,redirect,login,session-state,http-status-code-500
I create a clients manager for an association and during an update it stopped to work online. In my local machine it does function without problems. Updates are about some second page's buttons actions. The website is composed of two pages: the first one is a simple login page with...

DynamoDB Conditional Check Fail Monitoring

c#,asp.net,amazon-web-services,session-state,amazon-dynamodb
I have used dynamodb-session to set DynamoDB for Asp.net Session state provider. In my ASP.NET_SessionState table in DynamoDb There is "Conditional CheckFailed " monitoring. My question is: In what condition these exceptions happen and how can I reduce them?...

codeigniter session object expired availability

php,codeigniter,session,session-state
This might be a silly question. Once a user has been logged in, if session expires I want to redirect him to a "lockscreen" instead to a "login" page. I want to send to the lockscreen some session data (like img-src and loginname) So, here's the question. Does session object...

Web API and MVC in the same project with Session States

c#,asp.net-mvc,asp.net-web-api,session-state
I'm been working around an ASP .Net MVC application that is going take log in requests from different sites with different configurations (so I cannot use the FormsAuthentication SSO way). The way I decided to resolve this was by creating temporal login request tokens, so each token could be used...

Invalid form submission clears session in Rails 4

ruby-on-rails-4,session-cookies,form-submit,session-state
I'm using a session to auto fill the first half of a form in Rails 4. The first time a customer submits a form (featuring their details and product details), the customers details are stored into a session. Upon subsequent forms (additional orders), the customer's details are pulled from the...

How do you configure SQL Session State in ASP.NET 5.0 (vNext) MVC 6? [closed]

sql-server,configuration,session-state,asp.net-5,asp.net-mvc-6
In Visual Studio 2015 RC, ASP.NET 5 vNext, i am trying to use SQL Session State in MVC 6. I'm not sure how to go about it. Can anyone show me a sample or give me some tips? I'm just trying out Azure Load Balancer. I set up a load...

In a multi web server farm, how does session state work?

asp.net,session-state
CASE 1: StateServer <system.web> <sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42626" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" /> ... </system.web> CASE 2: SQL Server <sessionState mode="SQLServer" stateConnectionString="tcpip=127.0.0.1:42626" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" /> Question: 1. In case 1 and 2 appropriate location of sql or state server have to be...

How can I make DropDownList retain selected value when navigating between pages

asp.net,vb.net,drop-down-menu,session-state
Any help with the following would be much appreciated... I have three DropDownLists on my page and I am binding data in Page_Load event when (Not Page.IsPostBack). Users will select values from the DropDownLists and navigate to a different page. If they then select to 'Go Back' to the initial...

Keep a session variable value after it has been cleared?

asp.net-mvc,session-variables,session-state
Question background: I have a session object that is used to store a list of object called 'CartItems'. I convert this object to an actual instance, set it to another List variable then finally clear the list. This is then sent to to a ViewBag variable and sent to a...

Best way to hide values for sessionState provider

asp.net-mvc,azure,session-state,stackexchange.redis
I am using a Redis cache Session State Provider in my MVC application. Of course, all the settings for the provider are in my Web.config. The app works if I simply put the Host and Key and all that in as simple strings, so it looks like this: <sessionState mode="Custom"...