model view controller - Session time out error -


my application expiring before 20 minutes , when working on expiring may know have change?..

 public class checksessionoutattribute : actionfilterattribute {     public override void onactionexecuting(actionexecutingcontext filtercontext)     {         httpcontext ctx = httpcontext.current;          if (ctx.session != null)         {             if (ctx.session.isnewsession)             {                 string sessioncookie = ctx.request.headers["cookie"];                 if ((null != sessioncookie) && (sessioncookie.indexof("asp.net_sessionid") >= 0))                 {                     if (ctx.request.isauthenticated)                     {                         formsauthentication.signout();                         httpcontext.current.session.clear();                         redirectresult redirectingto = new redirectresult("~/account/timeout");                         filtercontext.result = redirectingto;                     }                     else                     {                         string loginurl = formsauthentication.loginurl;                         redirectresult redirectto = new redirectresult(loginurl);                         filtercontext.result = redirectto;                     }                 }             }         }         base.onactionexecuting(filtercontext); } 

web.config file

<authentication mode="forms">   <forms loginurl="~/account/login" timeout="1000"/> </authentication> <sessionstate  mode="inproc" timeout="20" /> 


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -