FileNotFoundException: The site with the id {GUID} could not be found.

This was an interesting problem that I ran into today that really stumped me for a while.  The scenario was this, we had a flash file (swf) sitting in a document library.  This flash file was being served up on the home page of the site.  All of a sudden, flash file disappears.  I took a look in one of my favorite tools, Fiddler, and found that it was getting a 404 on the flash file.  I then navigated to the file manually and tried to open it.  When I clicked on the link in the document library I got an error stating "System.IO.FileNotFoundException The site with the id {some guid} could not be found."  It was basically like this file didn't exist, but there it was in the document library staring me in the face.  I tried the usual tactics, download a copy, open it up to verify the file is alright, delete the file in the doc library, upload the file again...same result.  I tried renaming it once I uploaded it and amazingly this worked.  This led me to believe that it was something to do with the BLOB cache.  For those of you who don't know the BLOB cache is a disk based cache used for storing images, css, javascript, etc.  By default this setting is off, but we had turned it on, as I think most people should.  This allows IE to cache these objects which is a very good thing for publishing sites.  It also reduces trips to the DB because the files are available on the hard disk directly on the WFE.  This led me to try resetting the cache.  You can do this through Site Actions/Site Settings/Modify All Site Settings/Site Collection Object Cache.  I checked all three checkboxes here and clicked OK and voila, flash file is working again.  My theory is that somehow the disk cache got out of sync and SharePoint was looking for a file on the disk that wasn't there, but was in the DB.  If anyone else has run into this issue I'd be curious to hear your experiences.

Comments

  • Anonymous
    June 16, 2008
    Nice post Josh!  I ran into this exact issue, followed your steps and solved my problem! :-)

  • Anonymous
    July 07, 2008
    I had the same error and your post fixed it. Thank you.

  • Anonymous
    November 28, 2008
    Its a Great Post. It saved my 2 hr .Many Thanks Abhishek Agrawal HCL Tech. NOIDA India

  • Anonymous
    February 13, 2009
    Thanks. Ran into this issue after a restore to another environment.

  • Anonymous
    February 18, 2009
    I have the same error and followed steps as you mentioned. But not worked for me. Exception information:    Exception type: FileNotFoundException    Exception message: The site with the id ff0e3ca6-f384-4d0d-9dfa-6ab9065f59a4 could not be found. The .CSS file is there in the Blobcache. It is requestion for .CSS file. Please help me to solve this. Thanks, Dhaval

  • Anonymous
    March 29, 2009
    Thanks so much for this post Josh, this one really had me baffled.  My anonymous users were fine, but my FBA users could not access the CSS in the style library, despite having permissions.  This solved it.  I don't think I ever would have found it without your post. Wendy

  • Anonymous
    June 25, 2009
    Thanks for this very helpful post Josh. I ran into the issue several times with core.css file unavailable after site restoration and now I know why :)

  • Anonymous
    July 09, 2009
    if you delete <BlobCache  tag on application web.config file, Every object works well. I have just receved some error for stsyle library directory object. And I deleted blobCach option on web.config. My site worked well. Thank you.

  • Anonymous
    July 10, 2009
    The comment has been removed

  • Anonymous
    September 27, 2009
    BIG THANKS - Made my day (or days), have been struggling with this problem for days. - Restoring content bases, looking in code, etc. - And the solution is so simple.

  • Anonymous
    October 02, 2009
    I ran into similar issue. .JS file was not getting loaded. Turning off the blob cache in web.config solved the issue, thanks to you.

  • Anonymous
    February 02, 2010
    Amazinglyyyyyyyy helpfullllllllllllllllll Thanks a MILLIONNNNNNNNNNNN for posting this!

  • Anonymous
    June 16, 2010
    You are amazinggggggggg...........!!!!!!!!!!!!!!!!! Bless you....!!

  • Anonymous
    July 19, 2010
    Hi, the error occurred here after restoring a site so I clear the cache as you said and everything is working again, thanks.

  • Anonymous
    September 08, 2010
    Thanks a lot dear friend.it saved my 2 days work

  • Anonymous
    November 10, 2010
    Hi Josh I have the exact same problem for my css file ..I checked those 3 boxes ..but it didnt do anything ..I have blob cahce enabled as true and cannot remove it Its only a problem for FBA users and the file in question is control.css which is really a defualt file by SharePoint Could you help please Thanks Arjita