session-timeout

session-timeout in JSF

北城以北 提交于 2019-12-06 07:32:17
问题 I use the following codes to create a session object in JSF. The problem is that after sometime when I am trying to access userdet object it is giving me exception possibly because of session timeout. Is there anyway to increase the session timeout in JSF. FacesContext context = FacesContext.getCurrentInstance(); HttpSession session = (HttpSession) context.getExternalContext().getSession(true); session.setAttribute("userdet",user); When I use servlet I use the following codes but is it

How to handle report viewer session expired exception

て烟熏妆下的殇ゞ 提交于 2019-12-06 07:28:11
问题 I have the following situation: Microsoft Report Viewer 2010 is used to display reports (.rdlc files) in local mode in an ASP.NET web application. The report data is supplied by assigning a datasource in the code behind of an ASPX page. Here's an example: if(!IsPostBack){ ReportViewer1.Reset(); ReportDataSource reportDataSource = new ReportDataSource(); reportDataSource.Name = "DataContainerType"; reportDataSource.Value = DatasourceOnPage; reportDataSource.DataSourceId = "DatasourceOnPageID";

Tomcat Session Eviction to Avoid OutOfMemoryError

Deadly 提交于 2019-12-06 06:08:41
We are running a vendor-supplied webapp in Tomcat 5.5 using the StandardManager for sessions (in memory). As sessions can get quite large (20M+), running out of heap space is a serious concern. Users want to keep sessions around for a couple of hours if possible but would rather evict sessions than run out of heap space. It does not appear that the vendor properly implemented Serializable in session'ed objects, so switching to the persistent session manager implementation isn't an option. Tomcat allows one to set a maxActiveSessions property that will restrict the overall number of sessions in

How to have PHP session expire upon browser close OR some extended duration of time

£可爱£侵袭症+ 提交于 2019-12-06 03:54:28
My php session is set to expire when user closes the browser but I noticed that if I leave my browser open for an extended period of time (24+ hours for example) the session still persists. Is there a way that I can have these sessions expire either when the browser is closed or when some extended period of time has transpired? The solution might be to set data via ini_set('session.gc_maxlifetime', <lifetime in seconds>); Of course if it's possible to change config via PHP. Otherwise you wil need to set proper values in your php.ini : ini_set(‘session.gc_maxlifetime’,30); ini_set(‘session.gc

Zend\Session\SessionManager and cookie_lifetime

雨燕双飞 提交于 2019-12-06 03:14:25
问题 I'm seeing some odd and frustrating behavior with ZF2 sessions and timeouts. Here's the code I use to set up the session: $sessionConfig = new \Zend\Session\Config\StandardConfig(); $sessionConfig->setOptions(array( 'cache_expire' => 525949, 'cookie_domain' => 'mydomain.com', 'cookie_lifetime' => 31536000, 'cookie_path' => '/', 'cookie_secure' => TRUE, 'gc_maxlifetime' => 31536000, 'name' => 'mydomain', 'remember_me_seconds' => 31536000, 'use_cookies' => TRUE, )); $sessionManager = new \Zend

HttpSessionListener - Will sessionDestroyed method be called on session timeout? [duplicate]

允我心安 提交于 2019-12-06 01:45:16
问题 This question already has answers here : How to call sessionDestroyed when a session times out (4 answers) Closed 2 years ago . I have an implementation of HttpSessionListener where 'locked' resources in the application are released with sessionDestroyed method. The 'lock' information is maintained in database, and the release of locks is working fine in most cases. But In some cases I still see resource is locked - even if there is no session active! So, I'm doubting if there is possibility

How to handle Session timeout in MVC 3

▼魔方 西西 提交于 2019-12-06 01:00:06
I am having issues with frequent Session Time Out. I want to write a common filter that I could use on each controller, filter should redirect the user to login and after log in back to from where user sent the last request. You could try something like this: public class SessionExpireAttribute : ActionFilterAttribute { public override void OnActionExecuted(ActionExecutedContext filterContext) { base.OnActionExecuted(filterContext); } public override void OnActionExecuting(ActionExecutingContext filterContext) { if (filterContext.HttpContext.Session != null) { if (filterContext.HttpContext

Different session time out for different users

只愿长相守 提交于 2019-12-06 00:50:16
问题 Is it possible to have different session time outs for different users? I need to have 180 mins session for admin and 20 min for non-admin users. Currently it is single session timeout for all the users. we are using a web.config key Any help would be appriciated. 回答1: Setting Session.Timeout property by code will set the timeout on a per user basis. You can manually set Session.Timeout = 20; or Session.Timeout = 180; based on the user type when they log in. This code should work for you:

How to do both sliding and absolute timeout in asp.net forms authentication

醉酒当歌 提交于 2019-12-05 18:02:36
I have an asp.net application which is currently using forms authentication with slidingExpiration="true". In web.config, we have the following: <authentication mode="Forms"> <forms loginUrl="Mylogin.aspx" timeout="15" slidingExpiration="true"/> </authentication> This is all to spec: There is a sliding 15 minute expiration. However, we now have a new security requirement: Users must re-authenticate every 24 hours, even if they have been "active" the whole time. In other words, even if you clicked a link in the site every minute for 24 hours straight after logging in, after 24 hours, you will

Session timeout is not sliding in Azure Redis Cache Session State Provider

谁说我不能喝 提交于 2019-12-05 10:11:57
Scaling out web application through multiple instances is one of biggest advantages of azure cloud. To achieve multiple VMs support for our web-role cloud application we are implementing Azure Redis Cache. We are using RedisSessionStateProvider provider for maintaining session state. Following are the configuration settings for session management within web.config file. <authentication mode="Forms"> <forms loginUrl="~/Login" slidingExpiration="true" timeout="20" defaultUrl="~/Default" /> </authentication> <sessionState timeout="20" mode="Custom" customProvider="MySessionStateStore"> <providers