Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7048175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:51:36+00:00 2026-05-28T02:51:36+00:00

I’m trying to learn SharePoint Client Object Model, specifically how to get a list

  • 0

I’m trying to learn SharePoint Client Object Model, specifically how to get a list of all SharePoint site URLs using a remote connection. This is possible using webservices…but I want to do it using the client object model.

I’ve figured how to get the title lists of a specific sharepoint site using the following code:

client object module):
  ClientContext  ctx = new ClientContext( server );
  ctx.AuthenticationMode = ClientAuthenticationMode.Default;
  ctx.Credentials = WindowsAuthenticationCredentials(username, password);

 Web w = ctx.Web;
var lists = ctx.LoadQuery(w.Lists);
 ctx.ExecuteQuery();

//Enumerate the results.
foreach (List theList in lists)
{

}

Output:

Announcements, Master Collection Pages… etc…

How can I do the same to get a site url list?

In web services you can call the following to achieve that, but as I said just trying to figure out how to do the same using client object module. If you can provide c# code that would greatly be appreciated.

WSPSitedata.SiteData sitedata = new SiteData();
sitedata.Url = @SharePointBaseURL + @"_vti_bin/sitedata.asmx";
sitedata.Credentials = our_credentials
_sSiteMetadata metaData = new _sSiteMetadata();
_sWebWithTime[] webWithTime 
 sitedata.GetSite(out metaData, out webWithTime, out users, out groups, out vgroups);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:51:37+00:00Added an answer on May 28, 2026 at 2:51 am

    The SharePoint Client Object Model CSOM is designed to remotly interact with your SiteCollection. Sure, it is possible to connect to various SiteCollections, but it’s not possible to look over all SiteCollections sitting within a SPWebApplications.

    In 2010 you could still use the ASMX WebServices which are available in earlier versions of SharePoint.

    To get a better understanding of the CSOM you should have a look at the MSDN site http://msdn.microsoft.com/en-us/library/ee537247.aspx

    Did you really mean a list containing all SiteCollection URLs or was that a misunderstanding?

    Thorsten

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn to call SharePoint Web Services from an external C# client.
I was trying learn lex and yacc using the oreilly book. I tried following
I'm trying to learn about shift-reduce parsing. Suppose we have the following grammar, using
Im trying to learn class-based views, for a detail or list view is not
I am trying to learn CodeIgniter to use for a shopping site, but I
Im trying to learn to build navigation menus using css. Ive stripped loads of
Trying to learn how to use JSON and parse the json data.i am using
I trying to learn how to use Java Swing's GroupLayout. First of all I
Trying to learn a bit of CSS and I want a horizontal navbar and
Trying to learn a bit about PDO and is going through this tutorial .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.