Solved

SharePoint Session Timeout

Posted on 2004-08-23
1
1,756 Views
Last Modified: 2008-01-09
I am aware that by default, sharepoint will timeout a web part.
However, you are able to just refresh the page and provide the information again.
I would like to have the session timeout, force the user to login again.
I have read on some other threads that I should modify the web.config file to do this.

If someone could confirm this and give me a little direction on how to edit this file correctly... it would be greatly appreciated.

Thanks!
0
Comment
Question by:mmcleod1
1 Comment
 
LVL 10

Accepted Solution

by:
avidya earned 50 total points
ID: 11875428
Hi,

Just add this in your global.asax.
'Uses the OnAcquireRequestState event so you have session vars accesible
Sub Application_OnAcquireRequestState(sender as Object, Details as EventArgs)
If Session("MyVariable") = "" Then
'Signout
FormsAuthentication.SignOut()
' Tries to Reload the page and then redirects to the Login page
Server.Transfer(Request.Url.AbsolutePath.ToString, True)
End If
End Sub


This one explains a lot about web.config:
http://authors.aspalliance.com/das/web.config.aspx#10
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=307

This one about security
http://www.15seconds.com/issue/040511.htm



if(Session["memberID"] == null)
{
Response.Redirect("redirectpage.aspx");
}
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video teaches users how to migrate an existing Wordpress website to a new domain.

747 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

9 Experts available now in Live!

Get 1:1 Help Now