.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Session timeout

Posted By: Aamrapali Tamgadge     Posted Date: June 14, 2011    Points:5   Category :ASP.Net
How To Increase the session timeout for four to five hours?

Responses
Author: Gowthammanju             
Posted Date: June 14, 2011     Points: 20   

for Forms authentication u can code as

u can increase the default time as

<system.web>
<authentication mode="Forms">
<forms timeout="50"/>
</authentication>

<sessionState timeout="60" />
</system.web>




Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: June 14, 2011     Points: 20   

For asp.net pages u can code as


<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
stateNetworkTimeout="60"
sqlConnectionString="data source=127.0.0.1;Integrated Security=SSPI"
cookieless="false"
timeout="60"
/>


This is the minimum time out u can increase it as u like

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: June 14, 2011     Points: 20   

you can increase session timeout in web.config file

open web.config file and search this line



<
sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"/>


and increase timout value.



Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Aamrapali Tamgadge             
Posted Date: June 14, 2011     Points: 20   

hi i have set the session timeout 60 but it get timeout in 1 min.

Software Programmer At OTIS ISRC
Author: Aamrapali Tamgadge             
Posted Date: June 14, 2011     Points: 20   

i have being searching from last week but m not getting the exact solution of my problm.
i have simply declared <sessionState timeout="12000" /> den it is working fine on local machine but when it is on server after some time 20 or 30 when i click the submit button no action is performed it is not redirected to the next page.
session timeout is in min then y it is taking in second and if it is taking in second

Software Programmer At OTIS ISRC
Author: Gowthammanju             
Posted Date: June 14, 2011     Points: 20   

Hey

its right 1 minute is 60 seconds

so calculate second for total hours which u want to get time out

for 4 hrs- 240 minutes - 86,400 seconds

so just replace with the above seconds

u may find solution

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: June 14, 2011     Points: 20   
Author: Aamrapali Tamgadge             
Posted Date: June 14, 2011     Points: 20   

hi i think u u have wrong in this statement
for 4 hrs- 240 minutes - 86,400 seconds

for three hour i have write 12000 but it is working fine on local machin.nut not working on server after 20 to 30 min if i click on submit button no action is performed not even my currunt page is redicted to the next page.
why it is happening on server only?

i have check your links can u tell me from where i have to set this setting
on local or server.becoz on server there is no such types of tab i found.

Change the following time-outs in Internet Services Manager .Choose a value greater than the default of 20.

1. Select Default Web Site > Properties > Home Directory > Application Settings > Configuration > Options.

2. Enable the session state time-out and set the Session timeout for 60 minutes.


Software Programmer At OTIS ISRC
Author: Aamrapali Tamgadge             
Posted Date: June 14, 2011     Points: 20   

please suggest me what should i do no one cant solve this problm.m trying since last week.

Software Programmer At OTIS ISRC
Author: Gowthammanju             
Posted Date: June 14, 2011     Points: 20   

hey did u tried using Server.ScriptTimeout


use coding as

<% 
Server.ScriptTimeout = 180
%>


it may solve ur problem

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Aamrapali Tamgadge             
Posted Date: June 14, 2011     Points: 20   

no i didnt tried it yet my time value is coming from database and m placing it on time session on timer click m maintaining all.

Software Programmer At OTIS ISRC
Author: Aamrapali Tamgadge             
Posted Date: June 14, 2011     Points: 20   

Label5.Text = Request.QueryString["test"];
Label4.Text = "Welcome " + Session["Result"].ToString() + "to Accounting Accademy";
lblRemTime.Text = Session["time"].ToString();
Timer1.Interval = Convert.ToInt32(Session["time"].ToString()) * 60000;
Timer1.Enabled = true;


like this m maintaning the timer value

Software Programmer At OTIS ISRC
Author: Gowthammanju             
Posted Date: June 14, 2011     Points: 20   

Hey


You have mode="InProc" but you're also specifying connection strings to a state server and a database. This means that you've configured 3 different modes at the same time. You need to pick one.

More help is available here: http://msdn.microsoft.com/en-us/library/ms178581.aspx#Y342

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: June 14, 2011     Points: 20   

Hey follow this url which may find solution

for this u need to change the settings in IIS

http://forums.asp.net/t/1283350.aspx

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Aamrapali Tamgadge             
Posted Date: June 14, 2011     Points: 20   

hi i have only write
<sessionState timeout="60" />
like this. is this statement by default takin InProc mode then is there i have to wire write State server mode?
i have check your links in these links there is IIS Session settings .Please tel me from where this IIS Session timeout i have to sewtup and up to what foe three to four hours. i have check in server panel there is only IIS Application pool Tab ubder this tab i cant find this IIS Session settings.
on local machin i didnt instal IIS

Software Programmer At OTIS ISRC
Author: Gowthammanju             
Posted Date: June 15, 2011     Points: 20   

First install iis it is the basic thing to deploy the web application project....


ask ur development team for this

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Aamrapali Tamgadge             
Posted Date: June 15, 2011     Points: 20   

but me running my website without IIS then what is the need for it on local machin is dat session timeout i have to set up on local machin?

Software Programmer At OTIS ISRC
Author: Aamrapali Tamgadge             
Posted Date: June 15, 2011     Points: 20   

hi but i need to knw from where i have to set the IIS ideal session timeout setting on local or server ?

Software Programmer At OTIS ISRC
Author: Pal             
Posted Date: June 15, 2011     Points: 20   

I agree...

Author: Aamrapali Tamgadge             
Posted Date: June 16, 2011     Points: 20   

still m not getting my solution

Software Programmer At OTIS ISRC


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend