Skip to main content

Posts

Showing posts from April, 2018

How to create Custom Web Service WCF (REST) in SharePoint 2013

SharePoint native web services can be access via _vti_bin mapped path. Deploying our custom service to this mapped path enables mapped features such as Access service using relative path Ex – Assume service is custom.svc; therefore it is possible to access it http://server/ _vti_bin/custom.svc http://server/sites/site/ _vti_bin/custom.svc http://server/sites/site/web/ _vti_bin/custom.svc http://server/sites/site/web/pages/ _vti_bin/custom.svc But SharePoint Project template does not contain wcf project therefore we need to do have some work around to archive this. Step by Step guide to create a custom SharePoint REST service Create a Empty SharePoint Project by Selecting as Farm Solution Then right the Project and Add –> SharePoint Mapped Folder –> select ISAPI and click ok Then create a sub folder under ISAPI that is use to deploy our service. Now we need to create wcf service and it’s interface. therefore add two classes named ServiceApiToken.c