Solved

Session Time out on apsx page

Posted on 2009-05-08
3
359 Views
Last Modified: 2012-06-21
Hi all,

I have included this
HttpContext.Current.Response.AppendHeader("Refresh", Convert.ToString(((HttpContext.Current.Session.Timeout * 60) - 10)) & "; Url=Login.aspx?Yoursession=expired")

on all pages, accordingy to one of the post for the redirection
and  this below in web.config file
<sessionState mode="InProc" cookieless="false" timeout="60"/>
Please let me know,
1) What the  http context statement means?(especially this  60) - 10)) )
2) Is it the correct way of including the session timeout and redirection?
3) even if i have given 60 mins and i'm using the page, the session expires.
4) I the above (4) is happening, where else can i look , what could be wrong?
can you please direct me to use the correct way of the page expiration.
Thanks
0
Comment
Question by:SaraDob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Author Comment

by:SaraDob
ID: 24338791
anyone?
0
 
LVL 20

Accepted Solution

by:
informaniac earned 250 total points
ID: 24403205
Have u stored any kind Session variable like Session["UserID"]

If yes you could just do this

if(HttpContext.Current.Session["UserID"] == null)
{
           Response.Redirect("SessionExpired.aspx");
}
0
 
LVL 1

Author Closing Comment

by:SaraDob
ID: 31579552
Thanks for the solution
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question