Solved

SharePoint Session Timeout

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

773 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