Solved

SharePoint Session Timeout

Posted on 2004-08-23
1
1,761 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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 tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…

911 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

25 Experts available now in Live!

Get 1:1 Help Now