Click here to Skip to main content
12,550,379 members (46,257 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET Membership
To increase the timeout I have written the following codes in we.config

<membership defaultprovider="ProjectProvider" userisonlinetimewindow="720">
				<add name="ProjectProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionstringname="ConnectionString" applicationname="MyApp" enablepasswordretrieval="true" enablepasswordreset="true" requiresquestionandanswer="true" requiresuniqueemail="true" passwordformat="Clear" maxinvalidpasswordattempts="5" passwordattemptwindow="10" minrequiredpasswordlength="5" minrequirednonalphanumericcharacters="0" />

<rolemanager cacherolesincookie="true" enabled="true" defaultprovider="ProjectRoleProvider" cookietimeout="720">
				<add name="ProjectRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionstringname="ConnectionString" applicationname="MyApp" />
		<authentication mode="Forms">
			<forms defaultUrl="Default.aspx" loginUrl="Login.aspx" timeout="720">

But, still it automatically logs out after 5-6 minuites. Someone please help me to disable this timeout feature.
Posted 22-Dec-12 21:11pm
Updated 22-Dec-12 21:13pm
Krunal Rohit 23-Dec-12 3:21am
what you actually want ?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1[^]

or in your code snippet write 99999 in place of 720.
Abhishek Pant 23-Dec-12 3:32am
Abdullah Al-Muzahid 23-Dec-12 6:55am
this is not working. still it logs out after 5-6 minuits
Abhishek Pant 23-Dec-12 7:36am
did you provided timeout anywhere else(other than this) in any page check that
Abdullah Al-Muzahid 23-Dec-12 7:38am
Abhishek Pant 23-Dec-12 7:58am
delete time out from your webconfig for cookiee part & write this on cookie event part
c1.Expires=DateTime.Now.AddHours(2); //this provides cookiee valid for 2hrs
Abdullah Al-Muzahid 24-Dec-12 2:01am
Dear Abhishek Pant, I am not clear about your solution. Would you please explain it.
Abdullah Al-Muzahid 24-Dec-12 2:13am
there is another problem in this application. If a page is opened fo more than 5-6 minuites, it throws a runtime error when users click on some button of the page. For that I wrote in the web.config

httpRuntime maxRequestLength="4000" executionTimeout="45"
Abhishek Pant 28-Dec-12 20:15pm
I think clicking those button will have some errors at runtime the operations were not handled properly and and for logout problem I think your session is not generated properly i.e. some conflict there on session logout.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161021.1 | Last Updated 23 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100