我需要通过Windows应用程序(C#)检索我可以访问的所有SharePoint站点的列表.我打算使用SharePoint Web服务.
使用SharePoint Web服务的任何指针都可以为我提供所需的信息?
小智 5
如果您想使用API,那么我建议您执行以下操作以返回当前用户的所有子网站,而无需使用提升的权限.
using(SPSite site = new SPSite("http://example/site/"))
{
using (SPWeb web = site.OpenWeb())
{
SPWebCollection webCollection = web.GetSubwebsForCurrentUser();
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14234 次 |
| 最近记录: |