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 (16)

  1. Jon says:

    Nice post Josh!  I ran into this exact issue, followed your steps and solved my problem! 🙂

  2. Jacob Egholm says:

    I had the same error and your post fixed it. Thank you.

  3. Abhishek Agrawal says:

    Its a Great Post. It saved my 2 hr .Many Thanks

    Abhishek Agrawal

    HCL Tech. NOIDA India

  4. Manuel says:


    Ran into this issue after a restore to another environment.

  5. Dhaval says:

    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.



  6. Wendy says:

    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.


  7. Michael Lopez says:

    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 🙂

  8. Kemal Karadag says:

    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.

  9. Josh says:

    If you have a content publishing site or high traffic custom site I wouldn’t recommend deleting the blob cache element in the web.config.  If you aren’t using the blob cache your content publishing site is going to go to the SP DB everytime it needs an image, css file, js file, etc.  Definitely not the most efficient way to operate long term.

  10. Rene Michael says:

    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.

  11. Vinay Bhatia says:

    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.

  12. Marian Abdelshahid says:

    Amazinglyyyyyyyy helpfullllllllllllllllll

    Thanks a MILLIONNNNNNNNNNNN for posting this!

  13. Nisha Yadav says:

    You are amazinggggggggg………..!!!!!!!!!!!!!!!!! Bless you….!!

  14. Luizgrs says:

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

  15. jain raj says:

    Thanks a lot dear saved my 2 days work

  16. Arjita chawla says:

    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