Saturday, January 10, 2009

IIS Virtual Directory - Cannot create a file when that file already exists

The issue started with an application enabled folder where any file you tried to browse to would return a 404. If you renamed this folder you couldn't rename it back to its old name. The error you get is Cannot create a file when that file already exists. This issue was not that folder already existed. I couldn't find anything that would have caused this. I opened up the metabase c:\windows\system32\inetsrv\metabase.xml and found the directory node with the old folder name. (Always backup your metabase when you directly edit it)


ouchris said...

Hi, I'm having this problem. What EXACTLY did you delete/rename in the metabase.xml file? I've seen other say to delete stuff but not exactly what.


Patrick Nielsen said...

Sorry for the delay. I have not seen this issue with IIS 7/7.5 yet. Your looking for virtual directory node in metabase. Should located under the site node but you can search the file for the phsical path of your virtual directory. Remember to backup your metabase.xml before doing any edits!