Click here to Skip to main content
Sign Up to vote bad
good
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

Comments
Krunal Rohit - 23-Dec-12 3:21am
what you actually want ?

1 solution

http://stackoverflow.com/questions/3839851/disable-auto-logout-feature-in-asp-net[^]
 
or in your code snippet write 99999 in place of 720.
  Permalink  
Comments
Sajeesh payolam - 23-Dec-12 3:21am
My vote is 5
Abhishek Pant - 23-Dec-12 3:32am
thanks
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
no
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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 6,959
1 Prasad_Kulkarni 3,671
2 OriginalGriff 3,359
3 _Amy 3,332
4 CPallini 2,925


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