Wednesday, March 7, 2012

SharePoint 2010 Anonoymous Access and List Web Part with Custom XSLT

A SharePoint 2010 Site with Anonymous Access has a List Web Part or any web part that has custom XSLT applied, Anonymous user will get access denied. It will work fine for logged on user.

Solution:

I have a SharePoint 2010 public site and it has Anonymous Access enabled.
On the Landing page I added a List Web Part based on the custom list I created to store announcement information or Ads information. So its a "Landing Page Ads" list.

I added a Landing Page Ads list web part on the page, assigned the custom xslt url in the Miscellaneous section under XSL Link i.e. /Anything/Anything.xsl

After assigning the custom xsl link, this web part is supposed to display list items in a rotating fashion or like a carousel. It works find for the logged on user but for anonymous user it won't work, displays access denied message for that web part. Rest of the content/web parts on the page will display with no problem.

The solution which works in my case: I edited the landing page in SharePoint Designer.

After "< /datafields >" add these tags "< xsl >< /xsl >" and copy the code from Anything.xsl and paste it between "< xsl >< /xsl >"

Save the file and check your landing page with Anonymous access, it should work fine and should not display Access Denied error.

Thanks,

4 comments:

Haseeb Akhtar said...

Hi Jasim, I have a question regarding Secure Store Service Application.
I have searched a lot but didn't get any suitable response.
Secure Store Service Application is not available in SharePoint 2010 Standard.
We have migrated from SharePoint 2010 foundation to SharePoint 2010 standard.
Now, the problem is we are looking for Secure Store Service on 'Services on Server'
page in Central Administration, but we didn't see it. We have another server where
SharePoint 2010 standard is installed and there we can see Secure Store Service
available. Please let me know what needs to be done for the same.

Thanks in Advance

Galvin Alvarado said...

Customized Web Parts provide you with a method to create user interface components that support both customization.

Kelly Strong said...

I think everyone should read your blog who want to good information about .net development. Thanks and keep it up!

Ishfaque Ahmedd Memon said...

I have tried to follow the steps but when i try to open the page in SP Designer 2013 since I am facing this issue in SP 2013 Site I am unable to find any such tag i-e .
Please help me in this regard.

Thanks