I want to build a web service to get data from database and be consumed from a SharePoint application. I am thinking of using Web API for that, but my question is, do I add a new project to my solution for web api? Is there a way to add web api service to my existing farm solution project?

If I add the web api as a separate project to my application, how do I deploy it to SharePoint, should I do manual configuration? Is there a way to deploy web api service to Isapi?


Here what you are trying to achieve a typical service oriented architecture. Coming to your questions, creating a web api is a isolated project. For the time being consider it as a seperate application whose whole sole purpose would be to expose some web api methods which can be consumed by client applications. Your web api methods will take care or handling the request and provide response either in form of xm/json/text or may be strong type.

Now assuming in your SharePoint farm solution you are creating a webpart which will display data by calling the above webservice, reading/interpreting the response and creating html controls/labels to display the data.

It would be better to keep your WEB API (web service) project separate, coming to your question on where to deploy the web service totally depends on where you want host it, if you have created a asp.net webservice or WCF service it can be hosted in IIS on any of front end application(ideally you should deploy it to application server).

Hope this helps...


  • Thank you. But isn't there a way to deploy my web api as part of the sharepoint project, like we do with svc services? – Jacky Oct 17 '16 at 14:39
  • you are create web api as part of SharePoint solution..but if you think it would be included in your WSP then that is not correct. SharePoint project output is WSP file which can be deployed on SharePoint webapplication/site collection....Web api could be part of .sln file but output of this project is no where related to SharePoint and hence either way it is fine.... please vote if it is useful.. – Siddharth Vaghasia Oct 17 '16 at 18:17
  • I am not looking to include it in the wsp. I was thinking I can put it in ISAPI mapped folder, just like we do with wcf service. – Jacky Oct 17 '16 at 19:50
  • ok......please go through below link jamestsai.net/Blog/post/… – Siddharth Vaghasia Oct 18 '16 at 7:01

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.