ViewState in Web Part And Custom Page SharePoint

I was using ViewState in custom developed SharePoint Solution to store date before saving to List because of some requirements. I found that the ViewState value was getting null after some duration which again was unable to meet my requirements. I went through some blogs and found that ViewState is cleared after some duration in SharePoint.

So I Found that 30 minutes by default and then SharePoint ViewState is cleared after.

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
$webApp.Update() 

Increasing this time out might have some performance implications.

Nice Article Please check this for details.

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

Share
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

3,679 thoughts on “ViewState in Web Part And Custom Page SharePoint”

  1. Hi. I have checked your azurewebsites.net and i see you’ve got some duplicate
    content so probably it is the reason that you don’t rank high in google.
    But you can fix this issue fast. There is a tool that creates articles like human, just search in google: miftolo’s tools

  2. Pretty component to content. I just stumbled upon your weblog and
    in accession capital to claim that I get in fact enjoyed account your
    blog posts. Anyway I will be subscribing
    on your feeds or even I achievement you get admission to constantly quickly.

  3. Howdy! Someone in my Myspace group shared this site with us
    so I came to look it over. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this to my followers!
    Great blog and terrific style and design.

Leave a Reply

Your email address will not be published. Required fields are marked *