Hi all,
Background in TFS whenever you create a new project, a new SharePoint site is created under http://sharepoint/sites/projectname. To see those subsites, the following is the link that describe it:
http://blog.aggregatedintelligence.com/2009/04/viewing-list-of-tfs-portals-in.html
Now I want to create a SharePoint webpart that retrieve all of the projects under http://sharepoint/sites. I use the following method:
using (SPSite site = new SPSite("http://sharepoint/sites/"))
{
foreach (SPWeb web in site.AllWebs)
{
//do operations here
}
}
Now the thing is that it doesn't work. The site does not retrieve the sites under those directories. How do I do that?