SharePoint : Writing Custom Web Service for SharePoint, is it supported?


You may already read this following article “Writing Custom Web Service for SharePoint Products and Technologies” ( or “Walkthrough: Creating a Custom ASP.NET Web Service” ( The steps can be summarized as follows:

  1. Create normal ASPNET web service
    In this step you will create ASPNET Web Services using Visual Studio as you always do. From this step, you will have **.**asmx, where is your web service asmx file.
  2. Create corresponding .disco file and a .wsdl file
    In this step you will create extract of DISCO_very_  file and WSDL of ASPNET web service from step #1, and add reference to Microsoft.SharePoint assembly. From this step, you will have 2 files **__disco**.aspx and **__wsdl**.aspx.
  3. Copy the 3 files to _vti_bin (12hive\ISAPI)
    In this step you will copy the 3 files (.asmx, disco.aspx and wsdl.aspx) into 12hive\ISAPI. Of course in real deployment, you can use WSP.
  4. Register the new web service in spdisco.aspx
    In this step you will modify built-in SharePoint file spdisco.aspx, so that your web service will be recognized by SharePoint.

Until here you will have working custom web service in SharePoint but  are you sure that your SharePoint farm is still supported?

If you read “Modifying Built-In SharePoint Files” ( rules, the step #4 is unsupported. Step#4 is to modify spdisco.aspx so that the custom web service will work.

So do you still want to built custom web service using that technique?
My suggestion, think twice! In fact you can still use ASPNET web service without SharePoint integration – it will work but lost SharePoint context. Moreover, you can’t tell WSP to modify spdisco.aspx unless you use event handler – which mean more complexity.

Riwut Libinuko
Sr. Cloud Solution Architect

My research interests include distributed robotics, mobile computing and programmable matter.

comments powered by Disqus