SharePoint XML Webpart Error: Failed to apply XSLT to the content

We noticed several cases where customers reported an

Error on a SharePoint XML WebPart: 
    “Failed to Apply XSLT to the content.”
or
    “unable to display this Web Part”

In ULS logs you may find these errors like this:

On SharePoint 2010:

Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.
at System.Xml.Xsl.XslCompiledTransform.Load(MethodInfo executeMethod, Byte[] queryData, Type[] earlyBoundTypes)
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)


On SharePoint 2013:

Exception System.NullReferenceException: Object reference not set to an instance of an object.    
at System.Xml.Xsl.XslCompiledTransform.Load(MethodInfo executeMethod, Byte[] queryData, Type[] earlyBoundTypes)    
at Microsoft.SharePoint.WebPartPages.XmlWebPart.LoadXslCompiledTransform(String xsl, String webUrl)    
at Microsoft.SharePoint.WebPartPages.XmlWebPart.ApplyXslt(String& contents, String transform)    
at Microsoft.SharePoint.WebPartPages.XmlWebPart.ProcessXml(Object state).

This issue seems to be caused by a recent published security fix for the .NET Framework 3.5.1.

See here for more:
KB 2844286 – MS13-052:
Description of the security update for the .NET Framework 3.5.1
on Windows 7 Service Pack 1 and Windows Server 2008 R2 Service Pack 1: July 9, 2013)

For SharePoint 2010 there is now a re-released fix out to resolve the problem.
See here for more: KB 2872441 – Microsoft SharePoint applications may encounter errors while executing web parts

Unfortunately for SharePoint 2013 this fix does not work as we use .Net 4.x whereas the above fix is only for .Net 3.5.xx
Currently the only option for here is to uninstall or roll back the fix on your servers.

There is no ETA yet, if or when a fix for SharePoint 2013/.Net 4.x will be published.

Related posts:
http://blogs.msdn.com/b/joerg_sinemus/archive/2013/07/25/sharepoint-2010-and-webpart-issue-after-net-fix-now-solved.aspx

 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s