Latest

"Unable to display this Web Part" sharepoint error with custom XSLT applied to list contains Large number of items

Introduction:
In this article we will explore, How to solve the SharePoint Web Part error “Unable to display this Web Part “while using custom XSL

PROBLEM:

"Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

Correlation ID: ae93579e-b40d-c07b-d97e-f14105eec10f"

Error while executing web part: System.StackOverflowException: Operation caused a stack overflow.     at <xsl:apply-templates>(XmlQueryRuntime , XPathNavigator )     at <xsl:template match="dsQueryResponse">(XmlQueryRuntime , XPathNavigator )     at <xsl:apply-templates>(XmlQueryRuntime , XPathNavigator )     at Root(XmlQueryRuntime )     at Execute(XmlQueryRuntime )     at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.ApplyXslTransform(XPathNavigator dataNavigator, XslCompiledTransform xslCompiledTransform, XsltArgumentList xmlArguments)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.ExecuteTransform(XslCompiledTransform xslCompiledTran...          ae93579e-b40d-c07b-d97e-f14105eec10f 



WORKAROUND:

This happens because the time allocated for XSL transformation is lesser while loading large number of records in the page.

By default Sharepoint allocates 1 second for XSL transformation.


SOLUTION:

To solve this issue, we need to increase the timeout seconds in Sharepoint FARM for xsl transformation.

Open Sharepoint Management Shell with "Run as Administrator"

Steps:
=====
Check Current Setting
$farm = Get-SPFarm 
$farm.XsltTransformTimeOut

$farm = Get-SPFarm
$farm.XsltTransformTimeOut


The default setting is 1 second ,Now increase the timeout to 5 seconds as below. 
(increase timeout seconds based on your page loading time)


$farm = Get-SPFarm
$farm.XsltTransformTimeOut = 5
$farm.Update()


Now the issue fixed, refresh the page to view the list items.



Hope this article helps !!


Thanks for reading this article ! ! please leave your comments and suggestion about this article.


No comments