The other day I moved my Sitecore data folder into
App_Data as that has special-protections (read: diplomatic immunity!) at the machine level. Along with this, I moved the Sitecore
temp folder there as well, and also the
IconCache folder…. bad move, Aidan.
Sitecore uses its
temp/IconCache folder as place to store cached versions of the icons (the ones that were moved into zip files a couple of versions ago to help with file system performance). But unlike
MediaCache, which loads the images via the media handler, icons are accessed directly via the temp folder path. So when I moved things into
App_Data I got this pretty little path used for the icons in the Content Editor.
Your eyes do not deceive you. Furthermore, when I look in the
temp folder, there are also a lot of images there that appear to be cached icon files, but aren’t put in the
IconCache directory. God might know why, as I certainly do not.
So your lesson for today*
Make sure your
IconCache folders are accessible from the web, not put in a protected folder like
App_Data. I really hope Sitecore isn’t using the
temp folder as a location to process or store potentially sensitive or protected files, because it makes sense to me that it should be moved out of the web folder completely (as I used to do), or into a protected folder such as
App_Data. Am I wrong in thinking this way?
Don’t use a tilde (e.g.
~/temp) in your temp folder path either. A file system request to an image such as
~/temp/IconCache/People/16x16/cubes_blue.png will throw a 404 as it won’t be processed by the ASP.NET application.
* I’m working with 6.4.1 rev. 110720, this may or may not be fixed in later versions.