会话超时ASP.Net [英] Session Timeout ASP.Net

查看:101
本文介绍了会话超时ASP.Net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图增加对所有会话超时。该网站托管与GoDaddy,这是写在Flash(当然客户端)和asp.net的后端。我已经添加到了我的web.config,

I'm trying to increase the timeout on all sessions. The site is hosted with Godaddy, and it is written in Flash (client side of course) and asp.net on the backend. I've added this to my web.config,

<sessionState timeout="720">

</sessionState>

这真的所有我需要做什么?我想preFER不让会话过期不断,但我敢肯定,服务器需要回收内存在某些时候......我不是在会话中存储任何东西,真的,只是用它来追踪通过该网站用户的进展,如果一个用户登录或没有。

Is that really all that I need to do? I'd prefer to not let sessions expire ever, but I'm sure that the server needs to reclaim that memory at some point...I'm not storing anything in the session, really, just using it to track users' progress through the site, and if a user is logged in or not.

感谢您的任何指针...所有的文档似乎看似简单,它那种让我很紧张......

Thanks for any pointers...all the documentation seems deceptively simple, and it kind of makes me nervous...

推荐答案

是啊!
作为;是的,这就是你需要做的唯一的事情...

Yup! As in; Yes, that's the only thing you need to do...

要获得永不落幕超时你必须创建一个后台的HTTP请求(这将发送会话cookie)返回到服务器,虽然每719分钟。虽然理论上那么你也得有进程外使用例如会话某种数据库或东西...

To get "never ending timeouts" you'd have to create a background HTTP request (which will transmit the session cookie) back to the server every 719 minute though. Though theoretically then you'd also have to have "Out of Process" sessions using e.g. some sort of database or something...

或者你也可以推出自己的会话处理程序,我想通过APS.NET使用某种适配器模式或什么的都有这种支持,但我不知道。然后,你可以有一个真正永不落幕会议...

Or you could roll your own session handler, I think APS.NET have support for this through using some sort of adapter pattern or something, but I am not sure. Then you could have a "truly" never ending session...

这篇关于会话超时ASP.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆