Solved

Session Time out on apsx page

Posted on 2009-05-08
3
358 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

738 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