3

I'm trying to understand the SharePoint hierarchy of objects and don't understand SPWebService .

Here is what I have:

  • SPFarm contains
    • One or (usually) multiple WebApplications, each contains
      • One or more SPSites which then contain one or more SPWebs

I know that each SPWebApplication can have one or more SPContentDatabases and that SPSite is really a child of a Content Database which is really a child of SPWebApplication.

It looks like the SPWebService sits between SPFarm and SPWebApplication, but I don't understand if there is always just one or if there can be multiple SPWebServices? And under what circumstances would someone have more that one SPWebService?

3

The SPWebService is a container for the SPWebApplications.

For instance You can use the SPWebService.ContentService static property to return the SPWebService object which contains all content web applications (the SPWebService.AdministrationService can be used to get the web app for CA).

1
  • Ah great, that solves another issue that I had, "how to get the Farm Admin Site?". Do you know if there can ever be more than 1 SPWebService in a Farm? – Michael Stum Jun 14 '10 at 2:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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