Hi,
I am developing a wesite in 4.0.
i have user login and after that I am maintaining user identity in session.
But the session gets expired after 1 or 2 mins when I am active on the site.
please advice how to resolve this issue.
Loading
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
Datta KharadRank #2,135 · 668 reputationPosted Jan 14, 2012, 2:41 AM EST
Session has default timeout 20 minutes but you can set time, Here is the parameter for the web.config that controls the ASP.NET timeout:
Prabhu RajaRank #861 · 2.6K reputationPosted Jan 14, 2012, 4:28 AM EST
You can get a Solution from this Article. Hope this will be useful.
http://www.c-sharpcorner.com/uploadfile/technoNet/session-timeouts-causes-and-remedies/
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 15, 2012, 6:17 PM EST
try this
and please refer
http://stackoverflow.com/questions/1205828/set-session-timeout-in-web-config
http://stackoverflow.com/questions/5354541/how-to-avoid-session-timeout-in-web-config
http://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.timeout.aspx
hope this help.
Sonali Khade40 reputationPosted Jan 15, 2012, 7:20 PM EST
I have used following code in web.config but still it is not working. The session gtets logged out within 1 or 2 minutes pls advice.
/>
Datta KharadRank #2,135 · 668 reputationPosted Jan 15, 2012, 8:38 PM EST
Just try this line in your code.
Session.Timeout = 60;
Sonali Khade40 reputationPosted Jan 15, 2012, 10:07 PM EST
session_statrt event but stil it is not solved.
Pls advice
Datta KharadRank #2,135 · 668 reputationPosted Jan 15, 2012, 11:05 PM EST
Just check it in Authentication...did you write session timeout in web.config as like below..
<forms timeout="50"/>
Sonali Khade40 reputationPosted Jan 15, 2012, 11:19 PM EST
in web.config I have not mentined authentication mode as forms