Enable View State

Scenario/Problem: Instead of using Session State, you would like to use View State.

Solution: Use the AllowViewState parameter with the Set-SPInfoPathFormsService cmdlet.

View state sessions (or Form View state) store session data within the client browser, thus reducing the load on the database server. Although this helps maximize database performance, more bandwidth is used in View state than in session state. The maximum session size allowed in View state is 40KB. If this limit is passed, the session automatically switches back to session state.

To configure these settings, use the Set-SPInfoPathFormsService cmdlet with the -AllowViewState and -ViewStateThreshold parameters, as shown in Listing 12.5.

Listing 12.5. View ...

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.