3.2 Example 2: Access a File in a Domain
The Access a File in a Domain use case illustrates a typical user interaction with the File Access Services System; the user locates a file within a DFS namespace and then reads it. This example demonstrates the use case described in section 2.5.2.
Prerequisites
All general requirements as set forth in section 2.4 Assumptions and Preconditions are met.
The participating client and server computers are configured to belong to the same Active Directory domain.
A DFS domain namespace is present in the Active Directory domain. This namespace contains at least one link, whose target contains a file which the User will access.
A file exists in the shared directory of the File server.
Initial System State
None.
Final System State
The user has obtained access to a specific file within a domain to which they have access.
Sequence of Events
This example is divided into three tasks:
Open a file in DFS namespace.
Enumerate a directory using the SMB protocol.
Read a file using the SMB protocol.
Task1: Open a File Within a DFS Namespace
The sequence described in this example details how an application uses the file client to open a file on the SMB file share, using mechanisms appropriate to paths that encounter DFS namespaces.

Figure 11: Sequence diagram for Open a file within a DFS namespace
The application invokes the open file operation within the DFS namespace with the specified UncPath, in order to direct the file client to communicate with the SMB File Service. This allows the application to gain access to the file and return a handle that it can use in subsequent operations against the file. The file client performs the mechanisms described in [MS-DFSC] section 3.1.4.1 to perform the application's request. These mechanisms include sequences equivalent to the Open a File in an SMB File Share (section 3.5.1) sequence diagram.
If the operation was successful, the SMB file service generates a handle, which is returned to the file client for use when performing subsequent operations on the file.
Task 2: Enumerate a Directory Using the SMB Protocol
The SMB client performs the Common Task 2 Enumerate a Directory Using the SMB Protocol sequence to enumerate the contents of the directory and their attributes.
The SMB Application performs the Common Task 4 Close a File Using the SMB Protocol sequence to close the directory handle previously opened.
Task 3: Read a File Using the SMB Protocol
The SMB-enabled application performs Common Task 1 Open a File in an SMB File Share sequence to obtain a handle to the file represented by UncPath.
The SMB-enabled application performs the Common Task 3 Read a File Using the SMB Protocol sequence to obtain the contents of the file.
The SMB Application performs the Common Task 4 Close a File Using the SMB Protocol sequence to close the file handle previously opened.