Overview
When attaching a vault, you may get an exception similar to:
The file data location does not contain valid files for this document vault
Figure 1: Error Message
Full stack trace:
MPropertyPage2.cpp, 102, The file data location does not contain valid files for this document vault. (0x80040816)
MPropertySheet2.cpp, 143, The file data location does not contain valid files for this document vault. (0x80040816)
PropertySheetDocumentVault.cpp, 742, The file data location does not contain valid files for this document vault. (0x80040816)
PropertySheetDocumentVault.cpp, 1234, The file data location does not contain valid files for this document vault. (0x80040816)
PropertySheetDocumentVault.cpp, 1280, The file data location does not contain valid files for this document vault. (0x80040816)
RPCMethodCallWithRetry.h, 180, The file data location does not contain valid files for this document vault. (0x80040816)
RPCMethodCallWithRetry.h, 180, The file data location does not contain valid files for this document vault. (0x80040816)
RPCVaultsAdmin.cpp, 1474, The file data location does not contain valid files for this document vault. (0x80040816)
RPCVaultsAdmin.cpp, 87, The file data location does not contain valid files for this document vault. (0x80040816)
VaultManager.cpp, 731, The file data location does not contain valid files for this document vault. (0x80040816)
VaultManager.cpp, 1486, The file data location does not contain valid files for this document vault. (0x80040816)
VaultDataFiles.cpp, 2188, The file data location does not contain valid files for this document vault. (0x80040816)
(M-Files 21.10.10725.5)
Cause
There are two common causes for this error:
- The wrong root folder was chosen when attaching the vault. Read more about this here.
- The FileData.id file in the FileData folder does not match the the vault. This article discusses this scenario.
Details
The FileData.id file is found in the FileData folder of a vault. Note that the file is missing if the vault is using MS SQL and the file data is configured to be stored in the SQL server.
FileData.id file provides mapping between the vault and the files for that vault. Its purpose is to ensure that a vault is not accidentally attached with mismatching file data. Use of metadata and file data which are not a pair can lead to severe problems, including data loss and various run-time error messages.
This mapping consistency is checked when the vault is about to go online - either when attaching it or when the vault has been offline and tries to go online (e.g., a restart). If a mismatch is detected, M-Files will prevent the vault from going online or from attaching. This is a deliberate safety measure.
This kind of situation should not arise during normal operation of M-Files.
Figure 2: Default FileData folder and FileData.id location
Solution
When attaching a vault, make sure to select the main vault folder to attach, not the FileData folder. Read more about this here.
Ensure that the correct file data is used when attaching vault. Never move or copy FileData.id from one data file folder structure to another while attempting to solve this kind of problem as that may cause severe and possibly irrecoverable problems.
In case of encountering this problem after ensuring the vault and file data should be a pair, please contact support (support@m-files.com) and we can assist in checking the issue - please send us the FileData.id file as well as the GUID of the vault. Please describe what kind of actions you have been taking and what you are attempting to accomplish.
