Click here to Skip to main content
14,271,339 members

Limitations of SharePoint Web Services

Rate this:
4.44 (8 votes)
Please Sign up or sign in to vote.
4.44 (8 votes)
9 Mar 2010CPOL
Discusses the limitation of SharePoint Web Services compared to SharePoint Object Model


SharePoint is a very vast topic to discuss. There are many documents, articles, discussion forums and FAQs available on the internet discussing various aspects of SharePoint. Still, getting consolidated information on some topics seems to be very difficult. The topic discussed here is one among them.


This article is an attempt to list down the limitations (in functionalities) of SharePoint Web Services compared to SharePoint Object Model.

This article is based on the below listed SharePoint versions:

  • Windows SharePoint Services 3.0 (WSS 3.0)
  • SharePoint Portal Server 2003 (SPS 2003)
  • Microsoft Office SharePoint Server 2007 (MOSS 2007)

This document does not discuss the usage of SharePoint Object Model or SharePoint Web Services, but focuses mainly on the limitation of SharePoint Web Services. This article does not discuss the details of SharePoint RPC or FrontPage Extension RPC.


This article expects that you are familiar with:

  • The concepts and usage of Web Services in general and related terms like WSDL, SOAP, XML, WebMethod, etc.
  • Basic .NET concepts of Assembly, Namespace, Class, etc.
  • The samples in the document are in C#, so familiarity with the same will also help to understand the discussed topic better.


  1. A Brief Introduction
  2. Performance Overhead of SP Web Service
  3. Limitation in Retrieving WebApps, SiteCollections
  4. Finding SharePoint Version
  5. Issues with Downloading Data
  6. Limitation in Retrieving Item Level Permissions

A Brief Introduction

What is SharePoint Object Model?

SharePoint Object Model is a .NET-based application programming interface (API) to SharePoint components which can be used to interact with a SharePoint Server. It can be used to communicate with all SharePoint components like Web Applications, Site Collections, Sites, Permissions, Roles, Users, Change Logs, etc.

Applications written using SharePoint Object Model require to be run on the SharePoint Server itself. It is not possible to use it to work remotely with a SharePoint Server. The Object Model is provided purely for server side programming. It can be used to extend the functionalities of the SharePoint server. Some examples are:

  • To create some server side tools that lists the Web Applications, Site Collections or all Sites in a SharePoint Farm
  • Writing custom web services, etc.

In a SharePoint farm which has more than one server, the application should be run on any of the Web Front End servers, which has the required SharePoint Assemblies (e.g. Microsoft.SharePoint.dll).

What is SharePoint Web Services?

SharePoint provides a set of Web Services that you can use to work remotely with a deployment of SharePoint. It provides methods for Administration, Alerts, Authentication, Copy, Document Work Space, Meetings, etc.

You can also run Web Service client applications on the server, but it will not provide any benefit in terms of performance or functionalities. Other methods or protocols which can be used for remote communication with SharePoint are SharePoint RPC (Remote Procedure Call) and FrontPage Extensions RPC.

In SharePoint 2010, Microsoft introduced a new object model known as Client Object Model, which can also be used to work remotely with SharePoint. Using Client Object Model, you can avoid directly interacting with Web Services.

Please refer to the official documentation on SharePoint Web Services to get the comprehensive list of features offered.

Performance Overhead of SP Web Service

Web Service in general is slow when compared to other binary communication mechanisms like .NET Remoting. Similarly, SharePoint Web Service is also slower if compared with Object Model.

What are the reasons for the slowness?

  1. Web Services use XML based SOAP (Simple Object Access Protocol) messages as the communication protocol. So every request has a marshalling un-marshalling overhead.
  2. Every request has to be authenticated using user name and password. It does not support the concept of authenticated session, which can be re-used with a session key. (An exception is ExcelService Web Service in MOSS 2007. It supports sessions when opening an Excel Workbook using OpenWorkBook() method.)

Limitation in Retrieving WebApps, SiteCollections

SharePoint Web Service can retrieve the list of Sites (sub sites), Lists and items from a Site collection.

The Webs Web Service can be used to retrieve the Sites and Sub Sites. The access URL of the Web Service is http://<site>/_vti_bin/webs.asmx. It provides the below listed methods to retrieve the Sites and Sub sites.

  • GetWebCollection: Returns the titles and URLs of all sites directly beneath the current site.
  • GetAllSubWebCollection: Returns the titles and URLs of all sites within the current site collection

If you want the list of all Site collections or WebApps, there is no way at all using any of the SharePoint Web Services.

Using SharePoint Web Service, it is not possible:

  • To retrieve the list of Site Collections from a SharePoint Farm
  • To retrieve the list of Web Applications
  • To find which is the MySite Host(s)
  • To find MySite URLs of all the users

Finding SharePoint Version

SharePoint Web Services do not provide any direct method to retrieve the version of the SharePoint server. You will have to use the FrontPage extensions RPC to retrieve the server version.

The details of the RPC method can be referred at

An example usage is:

HttpWebRequest webReq = HttpWebRequest.Create
	("http:/<site>/_vti_bin/shtml.dll/_vti_rpc") as HttpWebRequest;
webReq.Method = WebRequestMethods.Http.Post;
webReq.Credentials = new NetWorkCredential(user, passwd, domain);

StreamWriter strWriter = new StreamWriter(webReq.GetRequestStream());
	("method=server version:server_extension_version&service_name=site_url=/");

HttpWebResponse WebResponse = webRequest.GetResponse() as HttpWebResponse;
String response = new StreamReader(WebResponse.GetResponseStream()).ReadToEnd();

The string response has to be parsed to retrieve the full version information

Issues with Downloading Files

SharePoint allows its users to upload file(s) into the Server (with or without version control). Users can download the uploaded files programmatically or using a Web browser. SharePoint Web Service provides a Copy Service for the purpose of copying data from the server. The Copy Web Service can be accessed by the URL: http://<servername>/_vti_bin/copy.asmx.

The GetItem() method of the Copy service can be used to retrieve a file content from the Server. The syntax of GetItem() method is:

Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public uint GetItem (
   string Url,
   out FieldInformation[] Fields,
   out byte[] Stream

The file data is retrieved in the output parameter Stream. MSDN documentation says “Stream: An array of Bytes, passed as an out parameter that is a base-64 representation of the retrieved document's binary data.”

The overheads here are:

  • Marshalling/un-marshalling overhead: The SharePoint Server encodes the binary file data (e.g. Word, Excel file) into text (using Base64 encoding) in order to send it over Web Service. The client application should decode it back to the original encoding for viewing the file. This can affect performance.
  • Memory overhead: The GetItem() method uses a single buffer to retrieve the whole file content. In SharePoint, the maximum allowed size of a single file for upload is 50 MB by default. But this can be configured and the theoretical limit of file size in SharePoint is 2 GB. So having a single buffer to download a file is not practical due to obvious reasons.

The application programmer should use some alternate stream based mechanisms to download files from the SharePoint instead of using the web service (Copy Service). Here is an example of downloading file using .NET WebClient class.

string url = "http://<Site>/Documents/TestDoc.pdf";
string localfileName = @"c:\downloaded files\TestDoc.pdf";
// Create a new WebClient instance.
WebClient myWC = new WebClient();
// Set the credentials
myWC.Credentials = new NetworkCredential(username, password, domain);
// Download the file and save it into the local path.
myWC.DownloadFile(url, localfileName); 

Limitation in Retrieving Item Level Permissions

In SharePoint, permissions of the parent site are inherited to the List and to items by default. It is also possible to break this inheritance chain of permissions in order to enable unique permissions. Unique permissions can be enabled at Site or List or event at Item level.

There is a Permissions Web Service (http://<Site>/_vti_bin/Permissions.asmx) that is provided for working with permissions. It provides methods for working with the permissions for a site or list only. It is very much surprising that it does not support managing permissions at item level with Web Services.

Let's look at the GetPermissionCollection() method. The syntax is:

Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public XmlNode GetPermissionCollection (
    string objectName,
    string objectType

The MSDN says that the parameter objectType should be either List or Web. Other methods in this web service are AddPermission, AddPermissionCollection, RemovePermission, RemovePermissionCollection and UpdatePermission. The support matrix of object type for all the methods in this web service is given below:

Method Name Supported Object Types
AddPermission List, Web
AddPermissionCollection List, Web
GetPermissionCollection List, Web
RemovePermission List
RemovePermissionCollection List
UpdatePermission List, Web


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Reghunath Damodaran
Software Developer (Senior)
India India
No Biography provided

Comments and Discussions

GeneralMy vote of 4 Pin
sid138523-Sep-14 21:06
membersid138523-Sep-14 21:06 
Questionusing sharepoint 2007 web services in mobile applications Pin
Member 89104702-Jul-13 23:41
memberMember 89104702-Jul-13 23:41 
QuestionUploading images from remote server. Pin
rishozbratislavy12-Dec-12 9:14
memberrishozbratislavy12-Dec-12 9:14 
QuestionDo you have a Vs2010 version ? Pin
kkcci8888811-May-12 17:59
memberkkcci8888811-May-12 17:59 
QuestionList all pages in a publishing site Pin
mrajpurkar25-Jan-12 6:40
membermrajpurkar25-Jan-12 6:40 
GeneralSharepoint Web Services Pin
Ale Torres26-Mar-10 2:54
memberAle Torres26-Mar-10 2:54 
GeneralRe: Sharepoint Web Services Pin
Reghunath Damodaran27-Mar-10 9:03
memberReghunath Damodaran27-Mar-10 9:03 
GeneralRe: Sharepoint Web Services Pin
tumharadost11-Jan-12 20:39
membertumharadost11-Jan-12 20:39 
GeneralMy vote of 1 Pin
srihari@srihari.com7-Mar-10 18:08
membersrihari@srihari.com7-Mar-10 18:08 
GeneralRe: My vote of 1 Pin
tumharadost11-Jan-12 20:37
membertumharadost11-Jan-12 20:37 
GeneralRe: My vote of 1 Pin
wheresjeannine19-Jan-12 11:18
memberwheresjeannine19-Jan-12 11:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Posted 7 Mar 2010

Tagged as


18 bookmarked