Friday, November 15, 2013

Unable to display this Web Part. SharePoint Designer modified XSLTListViewWebPart

Scenario
  • A list or library view in the farm has ben modified in SharePoint Designer 2010
  • SharePoint Server 2010
  • An app pool recycle occurs (usually due to automatic nightly app pool restart)
Issue
  • You get the "Unable to display this Web Part." error message on any modified view.
  • SP Logs for the correlation id contain the following:
    • Failed to cache field with id "{GUID}", overwrite=0
    • Error while executing web part: System.InvalidCastException: Unable to cast object of type 'System.Reflection.RuntimeMethodInfo' to type 'System.Type'.     at Microsoft.Xslt.MethodCollection.MethodDescription.DeclareDynamicMethod(MethodCollection methodColl)     at Microsoft.Xslt.MethodCollection.CreateDynamicMethods()     at Microsoft.Xslt.MethodCollection.GetMethodInfoInternal(Int32 methodNumber)     at Microsoft.Xslt.MethodCollection.GetMethodInfo(Int32 methodNumber)     at Microsoft.Xslt.STransform.GetCompiledTransform()     at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.LoadXslCompiledTransform(WSSXmlUrlResolver someXmlResolver)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform()     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)
  • This seems to be a Microsoft bug and only occurs after occasional app pool resets
Resolution
  • IIS Reset
OR
  • Open the view in SharePoint designer and save

1 comment:

  1. Hi,

    we're experiencing exactly the same issue. There's already a thread in the MSDN social forum about the issue (http://social.msdn.microsoft.com/Forums/en-US/0c320a0c-ba23-419b-903e-72d4b68dc5b4/sharepoint-2010-list-view-webpart-throwing-error-unable-to-display-webpart?forum=sharepointdevelopmentprevious), so it seems to be a problem occuring on multiple systems.
    When we save the view again in SPD, the view works for a couple of days and than crashes again with the same error message.

    Have you found a permanent solution for this problem?

    Best regards,
    Marco

    ReplyDelete