Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends,

I gave the below code in webconfig

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


and i gave the following code in the global.asax file
session.timeout=540;


But my session is expired within 5 mins. what is the error in my code or what option i should give to extend my session timeout atleast 1 hour. Anyone know the answer tell to me.

Thanks in Advance,
Posted
Comments
sathya.spidy 3-Jan-12 0:37am    
Thanks for every one who answered my question.

You really shouldn't be holding a session open for that long - each session uses precious memory on the server. If you look at MSDN Session.Timeout[^] it does say that it should not be set higher than 20 minutes. If you need data retained for a long period, you should really use cookies instead.
 
Share this answer
 
Comments
Sridhar Patnayak 2-Jan-12 12:31pm    
Good suggestion 5
NandaKumer 2-Jan-12 23:05pm    
good one
XML
Hi satya,

in web.config set like this working fine

<sessionState  timeout="120"/>

otherwise

go through below url and download ASPNET_jQueryUI_Dialog_Timeout example try it

 working fine

 https://skydrive.live.com/?cid=f7c93b143c55f787&sc=documents&id=F7C93B143C55F787%21230#cid=F7C93B143C55F787&sc=documents[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900