Unable to display this Web Part: Unable to cast object of type ‘System.Reflection.RuntimeMethodInfo’ to type ‘System.Type’

Issue

You get the “Unable to display this Web Part.” error message on any modified view.

image 

Tracking down SharePoint Logs for the correlation id contain the following:

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.PrepareA…
…ndPerformTransform(Boolean bDeferExecuteTransform)

Cause

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 the view again.

Thanks you Smile

Enjoy SharePointing Open-mouthed smile Open-mouthed smile Open-mouthed smile

Advertisements