简体   繁体   English

监视SharePoint文档库

[英]Monitoring a SharePoint document library

I was wondering if there was a good way to monitor a document library on SharePoint for changes (new files added, files changed / checked-in, files deleted, etc.) 我想知道是否有一种很好的方法来监控SharePoint上的文档库以进行更改(添加新文件,更改/签入文件,删除文件等)

Basically, what System.IO.FileSystemWatcher does on local / network directories. 基本上, System.IO.FileSystemWatcher在本地/网络目录上执行的操作。

Are there events that get fired when documents are uploaded to document libraries? 将文档上载到文档库时是否会触发事件?

Perhaps creating a workflow on the document library that fires onCreate / onModify would be better? 也许在文档库上创建一个触发onCreate / onModify的工作流会更好?

Any suggestions are welcome. 欢迎任何建议。

Take a look at event receivers for lists/document libraries. 查看列表/文档库的事件接收器。 There are both synchronous and asynchronous options built into the object model. 对象模型中内置了同步和异步选项。 (ItemAdded, ItemAdding, ItemUpdated, ItemUpdating ... and so on.) (ItemAdded,ItemAdding,ItemUpdated,ItemUpdating ......等等。)

The following site should give you a good start: http://www.davehunter.co.uk/Blog/Lists/Posts/Post.aspx?List=f0e16a1a%2D6fa9%2D4130%2Dbcab%2Dbaeb97ccc4ff&ID=69 以下网站应该给你一个良好的开端: http//www.davehunter.co.uk/Blog/Lists/Posts/Post.aspx?List=f0e16a1a%2D6fa9%2D4130% 2Dbcab%2Dbaeb97ccc4ff& ID=69

That depends whether you need to react to these events immediately or if you can gather them later. 这取决于您是否需要立即对这些事件做出反应,或者您是否可以在以后收集它们。 For immediate actions event receivers would be the best option but you have to prepare them for each action type you want to handle. 对于立即操作,事件接收器将是最佳选择,但您必须为要处理的每种操作类型准备它们。 For the latter, you can use audit log. 对于后者,您可以使用审核日志。 That's a feature in sharepoint, that gathers information about user actions. 这是sharepoint中的一项功能,可以收集有关用户操作的信息。 This will require enabling some features on sites and maybe some configuration where you can specify which actions should be logged). 这将需要在站点上启用某些功能,并且可能需要一些配置,您可以指定应记录哪些操作)。

View: https://support.office.com/en-us/article/view-audit-log-reports-b37c5869-1b47-4a82-a30d-ea20070fe527 Configure: https://support.office.com/en-us/article/configure-audit-settings-for-a-site-collection-a9920c97-38c0-44f2-8bcb-4cf1e2ae22d2 查看: https//support.office.com/en-us/article/view-audit-log-reports-b37c5869-1b47-4a82-a30d-ea20070fe527配置: https//support.office.com/en-us /条/配置审计的设置换一个站点信息收集a9920c97-38c0-44f2-8bcb-4cf1e2ae22d2

Unfortunately I'm not sure if it's possible to get this data using CSOM - according to answer from the link below, you'll have to use server solution: https://social.msdn.microsoft.com/Forums/office/en-US/fd628034-9d6d-4f98-afb8-1d0bd6926bd0/accessing-audit-logs-using-csom-in-sharepoint-2013?forum=sharepointdevelopment 不幸的是我不确定是否可以使用CSOM获取此数据 - 根据以下链接的答案,您将不得不使用服务器解决方案: https//social.msdn.microsoft.com/Forums/office/en -US / fd628034-9d6d-4f98-afb8-1d0bd6926bd0 /访问-审计日志-使用-CSOM合的SharePoint-2013?论坛= sharepointdevelopment

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM