UpdatePanel postback full page reload

On my journey from SharePoint 2007 to SharePoint 2013 occured very strange problem. The project which I was migrating was using ASP UpdatePanels in combination with GridViews. The problem was that, if i clicked on some postback control in UpdatePanel, sometimes it made full page reload and sometimes classic postback refresh. I’ve spent several hours investigating this problem, but I’ve discovered literally nothing.

The project and SP Content Database was already migrated and fully (except update panels) functional in Sharepoint 2013. Moreover, this problem with bad post backs occurred only on one test machine. After few miserable hours spent in debugger i noticed some useful fact.
After full page load, postback controls were working as expected maybe 30 seconds. If page was idle for approx. half a minute and more, the postbacks were firing full page reload. 

After that, i discovered this thread on MS Technet forum, where some developers discovered this problem too. Some suggested to install Sharepoint December 2014 CU from Microsoft, or this HotFix, but neither of these worked in our case.

The final working solution was posted by Alexander Khaykin in the same thread. The provided JS code solves problems with NTLM connection and postbacks. If NTLM connection was lost, it ensures new connection before executing any postback. The script require SP.RequestExecutor.js library, as well as jQuery.

Edit: On our production server (2012) we had to install SharePoint updates from Windows Update in order to make script working.

Marek

Currently working as SharePoint Developer combining both back-end & front-end development scenarios. Also enthusiastic about Office 365 & Azure solutions.

You may also like...

Leave a Reply

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