Brinda Arumugam

Brinda Arumugam

  • 1.7k
  • 31
  • 10.1k

alive session while working in asp.net c#

Mar 27 2019 3:59 AM

Hi ,

while working , session automattically closed . how to session alive till my work completed.

In web config.

<sessionState mode="InProc" cookieless="true" timeout="30"/>

while login i'm maintaining customer id

Session["c_userid"] = "1";

In Every page & every action

if (Session["c_userid"] == null)
{
Response.Redirect(GetRouteUrl("HomeExpirePage", null));
}

if i m not doing anything in page 30 minutes session closed thats fine. but i m working in page that time Session["c_userid"] is null ? how ?


Answers (2)