ASP.NET Tip: Keep hidden files hidden


I have seen a few cases of this so I wanted to let everyone know.  If you install the FrontPage Server Extensions (FPSE) on a web server, it will install some configuration files in a directory under your web site called _vti_cnf.  This folder contains a bunch of files that FPSE use to update files and perform the various tasks that it needs to do.

The problem comes if that _vti_cnf folder is not marked hidden.  If something keeps that from happening, you can get a few different errors because of it.  The reason is that the aspnet_compiler.exe will try to compile these files since the folder isn’t hidden.  There is a web.config file in there that will cause an error like:

Invalid token 'Text' at root level of document.
XML document must contain a root level element.
Data at the root level is invalid. Line 1, position 1.

As long as this folder is hidden, the compiler will just skip over it and everything will be fine.

So the main thing to remember is that if you install FPSE and suddenly start getting errors, checking if that folder is marked hidden is a great place to start.

Comments (3)

  1. Chad Kitching says:

    That works for MOST of the directories in an ASP.NET application.  The problem is if you use an App_Browsers directory, the _vti_cnf folder can be deadly to your application.  The ASP.NET runtime seems to recurse through all the folders inside that one looking for *.browser files, and the one in _vti_cnf is malformed for ASP.NET.

    The only workaround I’ve found (besides constantly deleting them whenever they show up) is to create an empty file named _vti_cnf in the folder.  The existance of this file will block Frontpage-like programs from creating a folder of the same name, and ASP.NET completely ignores the file since it’s not a *.browser.

  2. Ray Stevens says:

    I have been having problems publishing to shared hosting on and off for months now. The symptom is an unhidden _vti_cnf in the images directory that causes a failure to publish. The problem was not on the server but on my machine. For some unknown reason, a ghost in the machine un-hides the _vti_cnf folder in the main project directory. The funny thing is that I have several other small web site projects, all very similar, that do not have a _vti_cnf folder anywhere in the project. Something?? either puts the folder in there when it feels like or un-hides it for the same reason. If anyone has a solution or other evidence for this mystery, please email me at: ray@stevens-software.com. Thanks Ray

  3. Alok Kumar says:

    We were getting problem in compilation. I am not sure if this was the main reason but this folder was not hidden and I have made it hidden and it surely solved the problem