Session expires error
after some time my website gives error session expires after login to my site
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pankaj PandeyRank #642 · 3.7K reputationPosted Jun 24, 2013, 12:57 AM EDT
or go to ur global.asax file and add
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jun 24, 2013, 1:03 AM EDT
default time out of session is 20 min. you can increase or decrease it.
just add this code in web.confg(60 mint)
<configuration>
<system.web>
<sessionState mode="InProc" cookieless="true"timeout="60"/>
sessionState>
system.web>
configuration>
or In Global.asax file we can set session timeout in Session_Start event like this
void Session_Start(object sender, EventArgs e)
{
// Code that runs when a new session is started
Session.Timeout = 15;//15mintues
}
for better understanding follow this link
http://www.aspdotnet-suresh.com/2010/10/session-timeout-problem-in-aspnet.html
any problem reply
mark it as answered if it helps you
Richa17 reputationPosted Jun 24, 2013, 1:10 AM EDT
now it works