Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Membership ASP>NET
To increase the timeout I have written the following codes in we.config
 
<membership defaultprovider="ProjectProvider" userisonlinetimewindow="720">
			<providers>
				<add name="ProjectProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, 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" />
			</providers>
</membership>
 

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

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
Edited 22-Dec-12 21:13pm
v2
Comments
Krunal Rohit at 23-Dec-12 3:21am
   
what you actually want ?

1 solution

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

Solution 1

http://stackoverflow.com/questions/3839851/disable-auto-logout-feature-in-asp-net[^]
 
or in your code snippet write 99999 in place of 720.
  Permalink  
v2
Comments
Abhishek Pant at 23-Dec-12 3:32am
   
thanks
Abdullah Al-Muzahid at 23-Dec-12 6:55am
   
this is not working. still it logs out after 5-6 minuits
Abhishek Pant at 23-Dec-12 7:36am
   
did you provided timeout anywhere else(other than this) in any page check that
Abdullah Al-Muzahid at 23-Dec-12 7:38am
   
no
Abhishek Pant at 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 at 24-Dec-12 2:01am
   
Dear Abhishek Pant, I am not clear about your solution. Would you please explain it.
Abdullah Al-Muzahid at 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 at 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)



Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 23 Dec 2012
Copyright © CodeProject, 1999-2014
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