Edit

Share via


Error "The namespace cannot be queried. The system cannot find the file specified" with DFS namespaces

This article helps resolve the error "The namespace cannot be queried. The system cannot find the file specified."

When you access, modify, or create a Distributed File System (DFS) namespace on a DFS namespace server, domain member server, or Windows client with File Services tools (included in Remote Server Administration Tools (RSAT)) installed, you might receive the following error message:

The namespace cannot be queried. The system cannot find the file specified

The registry entry or values are corrupt, modified, or missing

This error generally occurs when you access a DFS stand-alone namespace using the DFS Management console. The cause is that the entire registry key path or subkeys under the DFS stand-alone root registry are missing, corrupt or modified, on the DFS namespace server hosting the DFS stand-alone namespace root.

A DFS stand-alone namespace configuration will be stored under the following registry path:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DFS\Roots\Standalone\

Note

If in this current broken configuration state, you would restart the DFS server service on the affected DFS namespace server (holding the DFS stand-alone namespace), you'll receive the error "The Namespace cannot be queried. Element not found" while trying to reload or access the DFS stand-alone namespace from the DFS Management console.

Wireshark trace example

See the following Wireshark trace on a member server or a member client with RSAT File Services tools installed.

192.168.0.45    192.168.0.42    NETDFS    310    dfs_GetInfo request
192.168.0.42    192.168.0.45    NETDFS    214    dfs_GetInfo response, Error: WERR_FILE_NOT_FOUND

Import the registry key from a valid registry backup

Note

After you apply the solution, remove the DFS namespace from the DFS Management console and add it back, or close and reopen the console to make the changes take effect.

Important

This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For protection, back up the registry before you modify it so that you can restore it if a problem occurs. For more information about how to back up and restore the registry, see How to back up and restore the registry in Windows.

Importing the registry key for the DFS namespace root from a valid registry backup (if available) of the same registry key can resolve the issue.

If no backup is present, and since you have only a single DFS root server in a DFS stand-alone namespace configuration, the only option is to delete the DFS namespace, perform a DFS namespace cleanup on the DFS root server, and re-create the DFS namespace.

Note

Restart the DFS server or the DFS server service so that the changes in the registries are loaded into memory again. Not restarting the DFS server or the DFS server service might result in the same error.