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?

  • 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
    Commented Nov 22, 2011 at 12:20

1 Answer 1

  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: http://msdn.microsoft.com/en-us/library/ms462161.aspx

  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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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