SharePoint 2010: Weird problem with CQWP with a custom itemstyle.xsl -file.

Posted on 2011-10-31
Last Modified: 2012-05-12
Hello. I created a custom CQWP which basically does nothing but deploys customized xsl-file. Everything works fine when my cqwp is viewed by admin, but when page is viewed by standard user I get an error saying: Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation [...]

 Error while executing web part: System.Xml.Xsl.XslLoadException: XSLT compile error. An error occurred
at (1,456). ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.    
 at System.Net.HttpWebRequest.GetResponse()    
 at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials)    
 at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)    
 at Microsoft.SharePoint.WebPartPages.WSSXmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)    
 at System.Xml.Xsl.Xslt.XsltLoader.CreateReader(Uri uri, XmlResolver xmlResolver)    
 at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(Uri uri, Boolean include)    
 at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)     -
-- 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, Object stylesheet, XmlResolver xmlResolver)    
 at System.Xml.Xsl.Xslt.Compiler.Compile(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil)    
 at System.Xml.Xsl.XslCompiledTransform.CompileXsltToQil(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)    
 at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)    
 at System.Xml.Xsl.XslCompiledTransform.Load(XmlReader stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)    
 at Microsoft.SharePoint.WebPartPages.DataFormWebPart.LoadXslCompiledTransform(WSSXmlUrlResolver someXmlResolver)    
 at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform()    
 at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)

Open in new window

Question by:tolppa
    LVL 11

    Expert Comment

    Please recheck that you have published the ItemStyle.xsl file to everyone.
    Try to perform check-out/check-in again and publish it as aprimary version.
    I hope it helps.
    LVL 1

    Author Comment

    Actually I realized that I did not deploy (vs) my custom itemstyle correct folder but created a new folder for my customized itemstyle. Perhaps ordinary users don't have enougth privileges to use that folder? Is it possible to give them authority to use that folder?
    LVL 11

    Accepted Solution

    The content query web part works only with files from the Style Library/ XSL Style Sheets on the site collection level. You can change the name of the file to some custom name and place it to this directory.Then you need to redirect you web part to this file instead of the default item style file.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
    I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now