0

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.

1 Answer 1

1

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)

2
  • Did you get it working?
    – Hardik
    Jul 1, 2016 at 10:23
  • Thanks, I think this is what I need to change. Thanks again. You saved my day :) Jul 1, 2016 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.