SharePoint online ClientContext
2015-07-24 10:58
417 查看
1. The default class
Ina SharePoint provided-hosted project, as the project is built, the defaultSharePointContext.cs will be created in the 'Web Project' of the App project
And in this class, there is a function named 'GetSharePointContext', the default function is as follows:
public SharePointContext GetSharePointContext(HttpContext httpContext)
{
return GetSharePointContext(new HttpContextWrapper(httpContext));
}
Usually,we will store the clientContext in the session to re-use it. However,sometimes, the session will be expired.
2. The function in use
After a long research, we decide to use the following method to get the ClientContext:
3. How to get the parameter 'SPHostUrl'
3.1 At the front-end
3.2 At the back-end
Ina SharePoint provided-hosted project, as the project is built, the defaultSharePointContext.cs will be created in the 'Web Project' of the App project
And in this class, there is a function named 'GetSharePointContext', the default function is as follows:
public SharePointContext GetSharePointContext(HttpContext httpContext)
{
return GetSharePointContext(new HttpContextWrapper(httpContext));
}
Usually,we will store the clientContext in the session to re-use it. However,sometimes, the session will be expired.
2. The function in use
After a long research, we decide to use the following method to get the ClientContext:
3. How to get the parameter 'SPHostUrl'
3.1 At the front-end
3.2 At the back-end
相关文章推荐
- C与C++的区别
- Linux umount 报 device is busy 的处理方法
- SQL Server 2008如何创建定期自动备份任务
- ./configure 参数详解
- HighCharts使用心得
- Running multiple instances of Xamarin Studio on a Mac
- uilabel自适应高度
- 什么是文件的安全性问题,如何实现对文件的保护,试列举一种实现方案并加以说明?
- eclipse生成的各种文件
- #iOS开发笔记#iOS6及以下中,cell.backgroundColor设置失败的原因
- Caffe相关C++接口实例
- 体验MySQL5.6.25并处理所遇到的问题
- onvif 开发
- linux shell 模拟post请求
- Android 配置busybox
- springmvc 在方法上使用 @ModelAttribute 注解
- android 日志文件输出
- oc中framework的链接问题
- struts2流程
- 解读 Oracle 12c 的 12 个新特性