SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is my first post on this forum, so hello everyone. On Site Settings->Site Collection Administration->Site Hierarchy there is list of sites created on SharePoint. I would like to get this list to by desktop application using web service. How to get this list from SharePoint? Which method on web service use?

share|improve this question
What version? If 2007, you'll be limited to traditional web services, if 2010, you'll be able to use the Client Object Model. – James Love Nov 22 '11 at 12:20
  1. The MSDN does have an answer if you want to code your solution.. You can ask the SPSite's "AllWebs" Property to get the list of Sitecollections

      SPSite oSiteCollection = SPContext.Current.Site;
      SPWebCollection collWebsite = oSiteCollection.AllWebs;

    More here:

  2. In addition to that you could use STSADM.exe to enumerate sitecollections: STSADM -o enumsites -url http://%sharepoint%/

  3. Annnd... before i forget that... Webservice would be like this:

    http://%sharepoint%/_vti_bin/Webs.asmx -> GetAllSubWebCollection

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.