Question

I am storing some values in ViewState in my WebPart user control in SP2013. After some idle time, say 40 minutes when I try to access those values from ViewState i always get null result. Is it due to session expires and it also make ViewState blank causing this behavior. Can someone please guide me on this topic.

Thanks.

Était-ce utile?

La solution

Turns out that web application has a setting that can be controlled through Powershell

$web = Get-SPWebApplication "http://mywebapp..." $web.FormDigestSettings.TimeOut

This is by default 30 minutes and SharePoint Viewstate cache is cleared after FormDigestSettings.TimeOut +1 (i.e. 31 minutes)

$web.FormDigestSettings.TimeOut = New-TimeSpan -Hours 1 -Minutes 0

Increasing this time out might have some performance implications.

Kindly check below article.

AppFabric Caching (and SharePoint): Configuration and Deployment (Part 2)

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top