sharepoint

Create CSOM ClientContext with re-usability like singleton pattern

Deadly 提交于 2020-02-29 06:45:04
问题 The bounty expires in 4 days . Answers to this question are eligible for a +50 reputation bounty. Amna wants to draw more attention to this question: I need the accurate answer which will highlight how can making a static ClientContext object for reusability can affect? and what is the expiry of this context as when it is required to be refreshed? I have multiple methods being called on different user actions which is using ClientContext . Creating it on every method execution was causing

Update multiple choice field in sharepoint using rest api

ε祈祈猫儿з 提交于 2020-02-29 00:15:11
问题 I am trying to update the multiple choice field in sharepoint online using rest api. I am getting 401 bad request error. HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("XXXXX/_api/web/getfilebyserverrelativeurl('/sites/Sample/TestDoc.docx')/ListItemAllFields/"); string stringData = @"{'__metadata': { 'type':'SP.ListItem' }, 'TestColumn': { '__metadata': { 'type' : 'Collection(Edm.String)', results: ['Test1']}}}"; request.ContentLength = stringData.Length; StreamWriter writer =

Update multiple choice field in sharepoint using rest api

痞子三分冷 提交于 2020-02-29 00:10:53
问题 I am trying to update the multiple choice field in sharepoint online using rest api. I am getting 401 bad request error. HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("XXXXX/_api/web/getfilebyserverrelativeurl('/sites/Sample/TestDoc.docx')/ListItemAllFields/"); string stringData = @"{'__metadata': { 'type':'SP.ListItem' }, 'TestColumn': { '__metadata': { 'type' : 'Collection(Edm.String)', results: ['Test1']}}}"; request.ContentLength = stringData.Length; StreamWriter writer =

SharePoint 入门书籍推荐

社会主义新天地 提交于 2020-02-28 05:49:59
/*--> */ /*--> */   最近,总有人说刚入门SharePoint,没有好的资料或者电子书,资料推荐大家多看看博客园和CSDN的博客。对于看博客,我一般是两个思路,要么找一个人的从头到尾看一遍,觉得有意义的,就把地址加收藏;或者,列出这一次看博客想了解的知识点,内网/外网一通搜,然后一篇一篇慢慢看,先理解再实践。   再说电子书,学习SharePoint这么久,看过的书也不少,推荐几本给大家,有关于管理的、开发的、SharePoint周边的,希望对有需要的人,有所帮助。 sharepoint 2007版:   个人认为,这是SharePoint走向成熟的第一个版本,免费版叫WSS3.0。因为SharePoint2010及以上版本,中文资料少的可怜,所以SharePoint2007版本的资料,是最多的,学习从2007开始,也是最方便的。当然,高版本有高版本的特点,但更多的都是在之前版本的升级,我认为绝大多数地方,还是继承过去的。 书名:SharePointServer2007宝典 推荐指数: 推荐适用范围:SharePoint使用者、实施人员、管理维护人员。 推荐理由:   本书包括SharePoint产品和技术简介,环境准备和安装,SharePoint基本功能的使用,与Office服务继承,BI(商务智能)、KPI(关键性能列表)、业务数据目录

How to set the Sharepoint document type in an Excel file with VBA?

风格不统一 提交于 2020-02-23 07:31:25
问题 I'm creating an Excel file (.xlsb) each day and upload it manually to SharePoint. It always puts the file under document type 'Description' in SharePoint. But I want it under Document type 'Report'. Does someone have a piece of VBA code that sets the SharePoint Document type to 'Report' (or any other doc type) in the newly created XLSB file? I learned how to set a document property in an XLSB but I can't find the right property that does the trick for the SharePoint doc type. If I change the

SharePoint 之JS感悟-js脚本

你说的曾经没有我的故事 提交于 2020-02-18 21:31:51
  最近有些迷恋js脚本,因为自己对Asp.net不够熟悉,又是Moss的一年级新生,不是对代码开发不感兴趣,面向对象自己也了解一些,代码也能大致读懂,个人觉得还是经验积累,作为代码开发人员,还是需要3-5年的编程经验,程序就是这样,熟悉的过程。而相对,js就比较简单了,自己最近也比较迷恋js脚本,相比代码用对象模型或者ASP.net程序去读写SharePoint库,自己还是倾向于用js脚本进行操作,而SharePoint提供的定制功能也是很强大的,当然效率的问题和安全性的问题,都是必须要考虑的,自己也会在学习中不断完善自己的思路。   下面还是介绍下自己对js与SharePoint结合的一点点感悟吧,首先就是表间级联,SharePoint最大的优点就是平台性,很多东西都开发出来了,而我们需要做的就是怎么灵活的运用这些已经存在的东西,表间级联我的应用例子就是自己的一篇文章,给文档库添加评论。在给文档库的一篇文档添加评论的同时,把这个文档的ID作为列表中的一栏写到评论列表中,这个过程就是js脚本找到文档的ID然后放到定制的新建表单中,在保存评论时将ID带见评论表,而再通过筛选将文档的评论筛选出来。个人认为这是一个相当不错的思路,至少我是为了这个想法兴奋了好些日子。   相对而言,SharePoint很多的东西是开发出来了,但是很多东西看起来更像半成品,尤其很多页面的样式

Sharepoint对List增删改操作

谁都会走 提交于 2020-02-17 08:01:08
在sharepoint的开发过程中,用得最多的,就是获取sharepoint的列表数据,以及对其进行一系列的 增删改 查等操作,这里主要是记录一些常用的操作,通过对象模型方式对数据进行 增删改 查。 由于sharepoint对列表的数据都有权限要求,一般都是采取提升管理员权限, //提升管理员权限 SPSecurity.RunWithElevatedPrivileges(delegate() { //要执行的方法 }); 获取当前SPSite SPSite site = SPContext.Current.Site; 获取指定地址的SPSite SPSite site = new SPSite(" http://moss:8000 "); 获取当前SPWeb SPWeb web = SPContext.Current.Web; 获取指定SPWeb SPWeb web = site.OpenWeb(); 获取当前 List SPList list = SPContext.Current. List ; 获取指定名称的 List SPList list =web.Lists["列表名称"]; SPList list =web.Lists[new Guid("列表GUID")]; 遍历列表数据 foreach (SPListItem item in list .Items) {

Summary Blog Links

廉价感情. 提交于 2020-02-15 13:52:03
Useful Work Site Link: SharePoint Update: http://technet.microsoft.com/en-US/sharepoint/bb735839 Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007: http://blogs.technet.com/b/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx?PageIndex=4#comments sharepoint 2007 error in logfile "There is no web named": http://social.technet.microsoft.com/Forums/en/sharepointadminlegacy/thread/9aebee53-e6a8-4db6-a9c3-317c16c86897 "Save site as template" option and the publishing feature : http://blogs.technet.com/b/stefan_gossner/archive/2007/09/19/save

sharepoint 2013 FBA

偶尔善良 提交于 2020-02-15 13:49:48
在 SharePoint 2013 中为基于声明的 Web 应用程序配置基于表单的身份验证(ldap) Configure forms-based authentication for a claims-based web application in SharePoint 2013(ldap) http://technet.microsoft.com/en-us/library/ee806890.aspx http://technet.microsoft.com/zh-cn/library/ee806890.aspx SharePoint 2013 FBA Pack ( http://sharepoint2013fba.codeplex.com/ ) A forms based authentication pack for SharePoint 2013. It includes web parts for registering users, changing passwords and password recovery. It includes tools for managing users and roles and for approving registrations. This is a port of the SharePoint 2010 FBA Pack

SharePoint 2013备份方法整理

坚强是说给别人听的谎言 提交于 2020-02-15 05:45:40
关于SharePoint备份 SharePoint的备份是一个数据副本,主要用于在系统出现故障后还原和恢复该数据。 备份的工具主要有以下几种(写的不全,欢迎补充。) SharePoint管理中心的备份 Windows PowerShell备份 数据库备份 备份工具差异和方法整理 根据微软的最佳实践,根据网站集的大小来选择适当的备份工具。 一般来说,小于15GB的网站集,用PowerShell的Backup-SPSite命令进行备份。 15GB到100GB的网站集,通过数据库直接备份网站的内容数据库。 对于大于100GB的网站集,则可以通过数据库差异备份的方法对网站集进行备份。 SharePoint管理中心备份 SharePoint管理中心的备份,主要分为“场备份和还原”和“粒度备份”。 场备份和还原 通过“场备份和还原”可以备份服务器场的一些配置信息,包括配置数据库、解决方案、服务器设置和内容、映射等信息。 你可以将备份放在本地文件夹中,执行备份会生成spbr+4位数字的文件夹和spbrtoc的XML文件。 使用服务器场备份会备份一些服务器场的配置信息和网站的内容。一般不使用场备份来备份网站内容,推荐使用PowerShell中的Backup-SPSite命令或者管理中心的网站集备份或者直接备份数据库的方式来进行网站内容的备份。(我尝试过在不同环境下对SharePont整个场进行备份