When enabling blobCache, the following interesting things occur:
- Access Denied errors to blobCache folder are reported in Application Log:
An error occured in the blob cache. The exception message was 'Access to the path 'D:\BLOBCACHE\988970710\\STYLE LIBRARY\IMAGES' is denied.'.
- Your custom stylesheets stop working. You can see your stylesheet in blobCache folder but the content of that file is something totally different from your stylesheet.
- Some images are displayed, most of them are not, of some images you can only see half.
According to MS support:
"...there may be a fix being worked on to resolve this type of issue..."
"The first is to set 'AllowUnsafeUpdates' However the information covering this is vague and further research has shown that this change will cause a security risk by allowing cross site scripting.
The second workaround is quite simple to apply....
For this workaround all you should need to do is add 'NT AUTHORITY\authenticated users' to the site. From my tests it appears that you can add 'NT AUTHORITY\authenticated users' to any group and you can even remove all permissions from 'NT AUTHORITY\authenticated users' and it will still work as a workaround."
Second one was not applicable in my case as I already had the group on the site. Working workaround in my case was that I Checked the image OUT with SharePoint Designer, and Checked it back IN (without doing anything else) and Published it. It started to work immediately. As soon as I run the "Reset to Site Definition" on the image it breaks again.
- Set Modify privileges to your blobCache folder for IIS_WPG user group
- Unknown. Please try the second or third workaround.
- Office SharePoint Server 2007 hotfix package that is dated April 30, 2009 seems to contain fix for this, as it says in the hotfix description: After a reghost operation (Reghost.aspx) on a publishing Web, all files that have been customized at least once will have a hardcoded size of 200 bytes in the alldocs table after these files are restored to the original versions. This causes Blobcache to save only the first 200 bytes of the affected files to the cache. This behavior causes invalid images, .css files, and corrupt .js files served to visitors. The Blobcache reset is not enough. You must modify the files to have the correct size information in the alldocs table.
I was not able to find a solution for the errors. We had to run the config wizard again to remove the errors. Let me know if you could get rid of them.
We had the 'access denied' error occurring when setting up a blob cacheReplyDelete
Solution was - we were re-using a root folder from a previous web application that ran under a different identity. When the Blob Cache folder is created, permissions are set up, but if you reuse an existing folder, then permissions are not set up correctly.
Manually fix the permissions, or just use a different folder.
It takes a couple of minutes for Sharepoint to set up the folder structure.