954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to set session timeout

hi am developing a online test application
i need to fix up a time for the test and redirect to result page as soon as the test is over
how can i do this
i think we need to set up a session timeout property
can anyone clearly explain me how to do this with the code

Regards
shruthi

Shruthi_R
Newbie Poster
12 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

Of the top of my head what I'd do is have a main page with an iFrame in it and a javascript timer function. Run the test in the iFrame so the timer in the main page is uninterrupted. When the timer expires make it set the iFrames src address to the results page.

hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
 

Hey .....
Use tag for session timeout Property
important : Remeber 10000 in seconds....


Use Session_End Event which is available in Global.asax file.....

rmaheshmsc
Newbie Poster
9 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

Hey .....
Use tag for session timeout Property
important : Remeber 10000 in seconds....


Use Session_End Event which is available in Global.asax file.....

I would argue session timeout is not a good candidate for this particular problem.

ASP.NET is a framework based on a connectionless protocol. You can't 'push' things to the client. When the session state times out the server can't tell the client it's time is up and force it to POST it's answers. Session_End is also tricky to use in a reliable way.

hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
 

hey use the following code in the web.config file in u r application


Where 10000 in minutes......

rmaheshmsc
Newbie Poster
9 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

hey use the following code in the web.config file in u r application

Where 10000 in minutes......


Not only did you change units between your posts (from seconds to minutes), but you blatantly ignored the post describing why this method would be ineffective. :icon_rolleyes:

Infarction
Posting Virtuoso
1,580 posts since May 2006
Reputation Points: 683
Solved Threads: 53
 

Hey use this meta tag after the title tag in your
.aspx page

It will refresh automatically after some seconds that u mentioned in content property of the meta tag...

While refreshing u can identify using Page.IsPostBack Property ...
and u can redirect to some other page Where the results to be shown

rmaheshmsc
Newbie Poster
9 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

to change session timeout write this code in your web.config
file

or you can also set this in global.asax file as

Session.Timeout = 60 ; // in Session.Start() event

it will increase your session expire time .

suresh bangaru
Newbie Poster
4 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 
prashantprof
Newbie Poster
1 post since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You