Share via


Protected Document Library Sample

The AD RMS SDK includes a sample application that demonstrates a protected document library. This sample allows a viewer to navigate to a document library Web page using a browser and submit a document to the library, which stores and RM-protects the document. The page also provides a list of protected documents that the user can download, complete with a use license that was already acquired for that user, and view using the Rights Management Add-on for Internet Explorer.

The rights that are assigned to the stored files are determined by the user's permissions with the library. These permissions are stored as access control lists (ACLs). The sample reads the ACLs for the requesting user and converts them into appropriate rights in a use license that the add-on can interpret: a Read ACL is interpreted as a VIEW right; a Write ACL is interpreted as an EDIT and several other rights.

The format of files uploaded by the library is MIME Encapsulation of Aggregate HTML Documents (MHTML). All Microsoft Office documents can be saved as .mht files by using the Save As dialog box. This is an open standard. For more information about the MHTML format, see MIME Encapsulation of Aggregate HTML Documents (MHTML). (You can also find information on MHTML in the Rights-Managed HTML SDK for building compound files.) MHTML files can be viewed with a Web browser. In order to display the documents that you save to the document library, the browsing computer must have the Rights Management Add-on for Internet Explorer installed.

For more information and code samples that show how to build a protected document library, see Building a Protected Document Library.

To see what happens in the code when running the sample application, see Stepping Through the Protected Document Library Sample.

For more details about the sample application's classes and functions, see Protected Document Library Sample Classes and Functions.

Note  The error handling in the sample is not comprehensive. You should implement more robust error handling in any final application you create. Similarly, the code provided has been designed for teaching purposes, rather than for efficiency. You should not expect the code in this sample to be the most efficient way to perform the tasks shown.

See Also

Building a Protected Document Library
Installing the Protected Document Library Sample
Running the Protected Document Library Sample
Protected Document Library Sample Classes and Functions
Using Active Directory Rights Management Services

Send comments about this topic to Microsoft

Build date: 3/13/2008