There are many requirements for this. Recently, users in my projects also raised similar requirements. Wanghao-3 (http://www.cnblogs.com/wanghao-3) children in the first phase through custom fields to achieve a statistical document click times function, is a good idea.
If you use the audit feature that comes with Sharepoint, this is very cumbersome, and the information redundancy is large, it is not a suitable method.
Where is the perfect solution? To consider a solution, you must consider integrity, deployment, non-intrusive, and other aspects. Referring to the general permission management and AOP design mode, using httphandler for Interceptor is a good choice.
The custom httphandler for Sharepoint is described in the following link.
As a typical Asp.net application, Sharepoint can be deployed in a typical httphandler deployment mode. The following describes the related steps:
1. Develop an httphandler component and sign it. Drag the component to the GAC directory.
Only one row in the componentCode:
Context. response. Write ("unlucky child, this method is not allowed to download files! ");
2. Configure webconfig for the SharePoint site and add the interceptor.
<Add verb = "*" Path = "*. docx" type = "webapplication1.handler1, webapplication1, version = 1.0.0.0, culture = neutral, publickeytoken = 01c53c387f599d4b"/>
OK. When you right-click the view and save it as a direct download docx file, this unlucky child can only download it to an HTML page. When you open it, it is the content you output above. Of course, you can also ignore the restriction and only record the current information to the background database.
However, if the client is used for interaction, you have to check the interactive WebDAV.
Note: The DLL cannot be found during deployment. Later I found that because I directly mapped the GAC into a disk and copied the DLL into the GAC, and then drag it in. Here is an articleArticleDiscuss the reason
Http://hi.baidu.com/seapub/blog/item/07e61c4fd8bd623fafc3abbe.html