Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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.