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:
You can change the 20 minutes, of course.
Hope I helped,
Roi
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
$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
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
ReplyDeleteI have no idea - maybe send me the exact message you get
ReplyDeleteIt worked for me!
ReplyDelete