CSS is not rendering when Anonymous Access for Lists and Libraries is enabled
I have browsed other posts and have not seen the exact problem I am having, so here goes: I have a WSS 3.0 site using FBA with anonymous access enabled. I would like anon users to have access to a single list in my site. Under Site Permissions -> Settings -> Anonymous Access I have given anon users access to "Lists and libraries" and went to the list in question and given them Read permissions there (List Settings -> Permissions for this list -> Settings -> Anonymous Access). The problem is that when an anon user goes to this list the page looks horrible. It seems as though the CSS is not rendering, and they also cannot see images that are sitting in the Images folder I created using SharePoint Designer (one particular image is being used as the title image, and it does not render). They do indeed have access to the list as they can view items and such, but every page they have access to has the same problem. Now, when I change their permissions under Site Permissions -> Settings -> Anonymous Access to give them access to the "Entire Web site" then the problem goes away, but that effectively gives them read permissions for the entire web site (as expected), which I do not want. To me this is obviously a permissions issue (probably on the CSS file being used for that site, and the images folder I mentioned), but I cannot for the life of me find a way to give them permissions to these files. I have given "Everyone" and "IUSR" Read permissions on the _layouts directory in ISS as well as the IMAGES, LAYOUTS, and THEMES folders in 12 hive. I am not sure how to set permissions for the Images folder I created via SPD. Regardless, no matter what I do the problem persists. Does anyone have any ideas on this one? Any help would be greatly appreciated!
May 15th, 2010 3:02am

Hi, One solution would be to have images and custom css files in a library for which anonymous access is enabled. Having images and css files in library would also make future updation lot more easier e.g. user can upload css file after making changes to it, to change an image user just have to upload new image with same name, etc. Hope this helps. Regards.
Free Windows Admin Tool Kit Click here and download it now
May 15th, 2010 1:18pm

Rohit - Thanks for your reply. Unfortunately the css I am referring to is not custom. I am using an OOB Site Theme which has its own css file that I have not touched.
May 15th, 2010 10:27pm

Bump. The site is going live soon and I really need a fix for this. Although I am currently circumventing this problem by allowing access to the "Entire Web site" and breaking permission inheritance on every list in the site, it makes management a real pain. If anyone has an idea as to why the CSS is not rendering correctly I would love to hear your thoughts. - Jeff Barton
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2010 9:03pm

If you put the link to the CSS file in the browser as an anonymous user does it open correctly for you? It should ask you to save the file. The goal here is to verify that the reference to the file is correct and there's no permissions issues. Ideally you want to check the URL that is required to hit the correct CSS and also that it is being referenced properly. You could also do the same thing for the images. See if you can isolate the issue to either the CSS or images. John SharePoint911: SharePoint Consulting Blog: http://www.rossonmoss.com Twitter: JohnRossJr MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007
May 19th, 2010 3:01am

Thank you for your reply John. I'm not actually sure what link to use to access the CSS from the browser. Regardless, I found a solution to my problem: Instead of fussing with the permissions for an anonymous user, I found some really simple code that can be put in the global.asax that will automatically log in an unauthenticated user as 'Guest'. At this point all I had to do was give the Guest account whatever permissions I wanted; no anonymous access required. A link to the blog that helped me and the code mentioned above are below: http://blogs.devhorizon.com/reza/?p=508#comment-23984 <script RunAt='server'> protected void Application_AuthenticateRequest(Object sender, EventArgs e) { string cookieName = FormsAuthentication.FormsCookieName; HttpCookie authCookie = Context.Request.Cookies[cookieName]; if (authCookie == null) { FormsAuthentication.SetAuthCookie("Guest", false); } } </script> - Jeff Barton
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2010 3:57am

Upon further investigation, not even giving the Guest account Full Control over a particular list was enough to fix the CSS issue. I had to make a custom permission level with just the 'View Pages' permission (and consequently the 'Open' permission) then assign that permission level to the Guest account at the Site level. This effectively allows the CSS to render without giving them permissions to view everything in my site. Simply using the Read permission level would allow them to view all lists, which I was trying to avoid. - Jeff Barton
May 19th, 2010 6:30am

Hi, I have tested it in my VPC. It is working fine. Please check your event viewer to see if there are some errors regarding this part. I doubt that it is from database or shared services permissions. (Check your event log and then login with anonymous account then check your event log again) Hope it is helpful! Seven
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2010 11:19am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics