【发布时间】:2020-12-04 22:02:03
【问题描述】:
背景 在 TFS 中,每当您创建新项目时,都会在 http://sharepoint/sites/projectname 下创建一个新的 SharePoint 网站。要查看这些子网站,以下是描述它的链接:
http://blog.aggregatedintelligence.com/2009/04/viewing-list-of-tfs-portals-in.html
现在我想创建一个 SharePoint Webpart 来检索http://sharepoint/sites 下的所有项目。我使用以下方法:
using (SPSite site = new SPSite("http://sharepoint/sites/"))
{
foreach (SPWeb web in site.AllWebs)
{
//do operations here
}
}
现在的问题是它不起作用。该站点不会检索这些目录下的站点。我该怎么做?
【问题讨论】:
标签: sharepoint tfs