Solved

Session Time out on apsx page

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now