SharePoint 2010: Set session timeout on an FBA enabled site

One of the problems SharePoint 2010 when trying to work on Forms Based Authentication (FBA), all the settings in IIS (and web.config) enable sessions of not working.

After researching on google, I realized it was a problem in SP 2010.
There are many blogs that give code that fixes the problem by correcting the global.asax. I checked and indeed it works, but it does not seem the ultimate solution.

Best solution is (for me) working on SharePoint 2010 SP1. A code of PowerShell.

Code:

$sts = Get-SPSecurityTokenServiceConfig
$sts.LogonTokenCacheExpirationWindow = (New-TimeSpan –minutes 20)
$sts.WindowsTokenLifetime = (New-TimeSpan –minutes 20)
$sts.FormsTokenLifetime = (New-TimeSpan -minutes 20)
$sts.Update()
Iisreset

You can change the 20 minutes, of course.

Hope I helped,
Roi

Comments

  1. Hi , when i am using the above powershell script , session is getting expired when i am working ( it means even when the system is not idle session is getting expired in the given time ) is there any fix for this issue

    ReplyDelete
  2. I have no idea - maybe send me the exact message you get

    ReplyDelete

Post a Comment

Popular posts from this blog

A sharepoint list view of the current month

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters

Export SharePoint 2010 List to Excel with PowerShell