Dealing with with infinite form loading (spinner) in large customizations

Dealing with with infinite form loading (spinner) in large customizations

One of the most common issues in BPC PowerForms is the never-ending loading indicator display, with the form not being able to load at all. This is accompanied with a generic "Error 500" that is thrown in the browser's developer tools console, as well as the "Network" tab (if you press F12/Developer Tools), and it's encountered only in large form customizations (with many controls or scripts). If you notice that the issue doesn't happen in a new list that has only a couple of fields, then most probably the resolution below fits your scenario. 

The most frequent reason for this behavior is that SharePoint/ASP .NET by default prevents large JSON streams from being serialized. Therefore you will have to allow a larger number of bytes (that’s why it happens only in customizations of a certain size and above) in your web.config file of your SharePoint web application:

 <system.web.extensions>
    <scripting>
      <webServices>
        <jsonSerialization maxJsonLength="5000000" />
      </webServices>
    </scripting>
</system.web.extensions>

Normally the web config entry should be there, but there are numerous cases in Sharepoint installations (especially in 2013/2016 systems) where the configuration section is missing.

You should apply this change with caution to every web front end of your SharePoint farm.