session-state

ASP.NET Core 3.1 / Identity session never expires. How can I get it to expire on sliding expiration?

一笑奈何 提交于 2021-02-10 12:57:41
问题 A security check of my website showed that sessions (i.e. login) never expire. I've tested myself and I find the same - I opened up the site on localhost this morning and I'm still signed in from yesterday. I always assumed it would expire after 20 minutes like it would in .NET Framework apps. I'm using the ASP.NET Core Identity scaffolding with minimal changes other than implementing two factor authentication. In my Startup.cs I have the following code to add session support: services

ASP.NET Core 3.1 / Identity session never expires. How can I get it to expire on sliding expiration?

落花浮王杯 提交于 2021-02-10 12:57:17
问题 A security check of my website showed that sessions (i.e. login) never expire. I've tested myself and I find the same - I opened up the site on localhost this morning and I'm still signed in from yesterday. I always assumed it would expire after 20 minutes like it would in .NET Framework apps. I'm using the ASP.NET Core Identity scaffolding with minimal changes other than implementing two factor authentication. In my Startup.cs I have the following code to add session support: services

ASP.NET Core 3.1 / Identity session never expires. How can I get it to expire on sliding expiration?

荒凉一梦 提交于 2021-02-10 12:57:15
问题 A security check of my website showed that sessions (i.e. login) never expire. I've tested myself and I find the same - I opened up the site on localhost this morning and I'm still signed in from yesterday. I always assumed it would expire after 20 minutes like it would in .NET Framework apps. I'm using the ASP.NET Core Identity scaffolding with minimal changes other than implementing two factor authentication. In my Startup.cs I have the following code to add session support: services

Why does my tempdb reset permissions when the server is rebooted?

我的梦境 提交于 2021-02-07 11:40:11
问题 The past two times we have rebooted our sql server, our website has gone down. The reason appears to be because the tempdb is getting recreated and the ASPState user is losing permission to read/write to the tempdb (it is an ASP site and session data is stored in the sql server) This was not a problem until about two weeks ago. Does anyone know how I can prevent the sql server from resetting tempdb permissions after a reboot? Or why this only started happening recently? We are using MS SQL

Redirect after Session Timeout in MVC Action Filter

馋奶兔 提交于 2021-01-29 08:02:18
问题 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 filterContext) { var currentEnvironment = EnvironmentUtility.GetSession().Get<Environment>(); if (currentEnvironment == null) { filterContext.Result = new RedirectResult("~/Home/Index"); } base.OnActionExecuting(filterContext); } } In the controller, I have below code

Readonly access to session in a web service call?

两盒软妹~` 提交于 2020-07-20 07:07:24
问题 We have a .net asmx web service that gets called from javascript (using ASP.Net AJAX), and requires access to Session. [WebMethod(true)] public string DoSomethingOnTheServer() { } We're running into the problem of session being locked on a read/write request. Is there any way to mark a web service method as requiring read-only access to Session? Thanks! 回答1: This is a really old thread, but i stumbled on it in my search for an answer to the same question. I found the answer else where, and

ASP Net Core 3 Session (state) concurrency and integrity

邮差的信 提交于 2020-07-09 05:18:07
问题 I have a page which requests multiple requests concurrently. So those requests are in the very same session. For accessing the session I use everywhere IHttpContextAccessor . My problem is that regardless of the timing, some request does not see other requests already set session state, instead sees some previous state. (again in timing, the set state operation happened already, still) As far as I know each requests has its own copy of the state, which is written back... (well "when"?) to the

ASP Net Core 3 Session (state) concurrency and integrity

*爱你&永不变心* 提交于 2020-07-09 05:17:56
问题 I have a page which requests multiple requests concurrently. So those requests are in the very same session. For accessing the session I use everywhere IHttpContextAccessor . My problem is that regardless of the timing, some request does not see other requests already set session state, instead sees some previous state. (again in timing, the set state operation happened already, still) As far as I know each requests has its own copy of the state, which is written back... (well "when"?) to the

Grails session variable null

蓝咒 提交于 2020-06-29 10:16:32
问题 My app has an expensive service method, results of which must be 1) checked for errors and 2) presented to a Java applet via a URL (i.e. as opposed to a JavaScript variable). The method result is a string, and the applet is only capable of loading data from a file or URL. I tried to deal with the problem using a session variable: def action1 = { def input = params['input'] def result = expensiveServiceMethod( input ) def failed = result == null session['result'] = result render( view:'view1',

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