{"id":364,"date":"2011-09-29T06:55:24","date_gmt":"2011-09-29T06:55:24","guid":{"rendered":"http:\/\/www.thestupidbox.com\/blog\/?p=364"},"modified":"2021-06-25T04:15:38","modified_gmt":"2021-06-25T04:15:38","slug":"contentquerywebpart-error","status":"publish","type":"post","link":"http:\/\/thestupidbox.com\/blog\/contentquerywebpart-error\/","title":{"rendered":"ContentQueryWebPart Error"},"content":{"rendered":"<p>After we upgraded to SharePoint 2010, few web parts were giving the below error.<\/p>\n<p><code>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<\/code><\/p>\n<p>Recently I&#8217;ve added a Content Query Web Part and I got the same error. Checked the error log and got the following<\/p>\n<p><code><em>Error while executing web part: System.Xml.Xsl.XslLoadException: XSLT compile error. An error occurred at (1,462). ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.<br \/>\n...nclude)     --- End of inner exception stack trace ---     at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)     at System.Xml.Xsl.Xslt.XsltLoader.Load(Compiler compiler<br \/>\n...rt.LoadXslCompiledTransform(WSSXmlUrlResolver someXmlResolver)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform()     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.<br \/>\nInnerException 1: System.Net.WebException: The remote server returned an error: (401) Unauthorized.     at System.Net.HttpWebRequest.GetResponse()     at System.Xml.XmlDownloadManager.GetNonFileStream(Uri u<br \/>\n<\/em><\/code><\/p>\n<p>After going mad for hours, finally found this small thing which saved us. One of the internal XSL files referred from the &#8220;StyleSheet Library&#8221; was not published. Publishing all the xsl files fixed the issue.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After we upgraded to SharePoint 2010, few web parts were giving the below error. 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&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[103,104,101,102],"class_list":["post-364","post","type-post","status-publish","format-standard","hentry","category-technical","tag-cqwp-unauthorized","tag-cqwp-xslloadexception","tag-sharepoint-2010","tag-sps-2010"],"_links":{"self":[{"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/posts\/364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/comments?post=364"}],"version-history":[{"count":7,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/posts\/364\/revisions"}],"predecessor-version":[{"id":371,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/posts\/364\/revisions\/371"}],"wp:attachment":[{"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/media?parent=364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/categories?post=364"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/tags?post=364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}