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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sonali KhadePosted Jan 16, 2012, 4:19 AM
in web.config I have not mentined authentication mode as forms
Datta KharadPosted Jan 16, 2012, 4:05 AM
Just check it in Authentication...did you write session timeout in web.config as like below..
<forms timeout="50"/>
Sonali KhadePosted Jan 16, 2012, 3:07 AM
session_statrt event but stil it is not solved.
Pls advice
Datta KharadPosted Jan 16, 2012, 1:38 AM
Just try this line in your code.
Session.Timeout = 60;
Sonali KhadePosted Jan 16, 2012, 12:20 AM
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.
/>
Jignesh TrivediPosted Jan 15, 2012, 11:17 PM
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.
Prabhu RajaPosted Jan 14, 2012, 9:28 AM
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/
Datta KharadPosted Jan 14, 2012, 7:41 AM
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: