session

Alter session state when EnableSessionState is ReadOnly

╄→гoц情女王★ 提交于 2020-06-28 03:11:12
问题 I have a (legacy) ASP .NET WebForms project, and I want to set EnableSessionState to ReadOnly wherever possible to prevent the session lock from blocking concurrent page loads by a single user. On some pages, I actually do want to write to the session state. Normally, you would just set EnableSessionState back to True for only those pages where you need to write to the session. The problem is that the Page_Load event only needs to read from the session state, and the only code on the page

Why Session objects are not removed after Timeout period in Asp.Net?

随声附和 提交于 2020-06-27 13:33:22
问题 Why Session objects are not removed after Timeout period? I am using Asp.Net 4.0 and Session state is configured as shown below. <sessionState mode="SQLServer" cookieless="false" timeout="5" allowCustomSqlDatabase="true" sqlConnectionString="data source=.\SqlExpress;initial catalog=App_SessionState;user id=sa;password=xxxxxxxx"/> If I have not activity in browser for about 10 mins, shouldn't the Session object be removed. But after 10 mins I can still access the Session variable. Am I missing

Why Session objects are not removed after Timeout period in Asp.Net?

我的梦境 提交于 2020-06-27 13:33:19
问题 Why Session objects are not removed after Timeout period? I am using Asp.Net 4.0 and Session state is configured as shown below. <sessionState mode="SQLServer" cookieless="false" timeout="5" allowCustomSqlDatabase="true" sqlConnectionString="data source=.\SqlExpress;initial catalog=App_SessionState;user id=sa;password=xxxxxxxx"/> If I have not activity in browser for about 10 mins, shouldn't the Session object be removed. But after 10 mins I can still access the Session variable. Am I missing

Every time React sends request to Express, a new session is generated

别来无恙 提交于 2020-06-27 12:59:05
问题 I use React as a client to send request to Express with proxy and express-session set up. But every time React makes a request to Express server, a new session is created. So I checked Express alone by manually accessing to the same api url and it keep using the same session each time I refresh the page. Project structure: project-folder - client // React client with proxy set up + src + package.json + ... - server.js - package.json Inside server.js : const session = require('express-session'

Express session is empty in Safari

南楼画角 提交于 2020-06-27 11:03:39
问题 I'm building a Node.js application with express. I use express-session for sessions. The data I store in a session is available in IE, Chrome and Firefox. But in Safari the session is empty all the time. So when I do console.log(req.session) it prints: Session { cookie: { path: '/', _expires: null, originalMaxAge: null, httpOnly: true, secure: true }, userHasCheckCorrect: true } This are my settings in server.js app.use(session({ secret: process.env.SESSION_SECRET, resave: false,

Express session is empty in Safari

社会主义新天地 提交于 2020-06-27 11:02:21
问题 I'm building a Node.js application with express. I use express-session for sessions. The data I store in a session is available in IE, Chrome and Firefox. But in Safari the session is empty all the time. So when I do console.log(req.session) it prints: Session { cookie: { path: '/', _expires: null, originalMaxAge: null, httpOnly: true, secure: true }, userHasCheckCorrect: true } This are my settings in server.js app.use(session({ secret: process.env.SESSION_SECRET, resave: false,

Laravel subdomain: single auth across all subs not working?

核能气质少年 提交于 2020-06-27 08:31:23
问题 I'm building a site with a dynamic subdomain system eg (name.domain.com). I'm using Ubuntu with laravel's serve command. ive set it all up in my routes as so: Route::domain('{x}.localhost')->group(function (){ Route::get('/url/', 'SomeController@someAction')->middleware('can:xyz,x')->name('someName'); }); Now, everything works great, apart from the fact Auth is subdomain locked eg(xyz.localhost:8000/ , localhost:8000/) require separate logins. after a bit of googling I read, I can overwrite

PHP, nodeJS and sessions

99封情书 提交于 2020-06-24 03:22:09
问题 I have an classical apache server delivering php files, and a nodeJS server (with socket.io, but whithout express/connect) used for real-time event management on that PHP website. I sometimes need to authenticate the clients connecting to the nodeJS server, but this authentication is lost when the user reloads the page, because it also reloads the socket.io client (I store the socket ID on the server, which gets lost at each refresh) The question is: Is there a way to keep the connection

PHP, nodeJS and sessions

社会主义新天地 提交于 2020-06-24 03:21:32
问题 I have an classical apache server delivering php files, and a nodeJS server (with socket.io, but whithout express/connect) used for real-time event management on that PHP website. I sometimes need to authenticate the clients connecting to the nodeJS server, but this authentication is lost when the user reloads the page, because it also reloads the socket.io client (I store the socket ID on the server, which gets lost at each refresh) The question is: Is there a way to keep the connection

How to update session array via ajax?

[亡魂溺海] 提交于 2020-06-23 05:23:44
问题 I'm passing user input, which is just quantity and product code in this case to the php script to store into session array via ajax. I expect, each time user clicks submit and the ajax call is made, the quantity and product code will be added into session array. But now what happen is, each time it updates existing data in the session. So only one pair of data exist. This is my ajax script: <script> <!--display form submission result--> var param; var param2; var i; function sendToCart(param,