WCF – How to Host a custom WCF service in SharePoint
Recently I had to write a Custom WCF Service in SharePoint 2013 to expose the employee related data. You may be surprised to see how quickly it can be done on SharePoint, these are the basic steps you need to follow to get it working.
Step#1
Create an Empty SharePoint 2013 Solution
Create an Empty SharePoint 2013 Solution
Step#2
Enter the URL of a Site Collection and select Farm Solution
Enter the URL of a Site Collection and select Farm Solution
Step#3
Add the following References on the Add Reference
Add the following References on the Add Reference
Step#4
Create the Required Domain Objects
Create the Required Domain Objects

Step#5
Create the Required Service Interface
Create the Required Service Interface

Step#6
Create the Required Service Class
Create the Required Service Class

Step#7
Add Layouts folder to the solution
Add Layouts folder to the solution

Step#8
Since we cannot add a svc file directly, add a text file and rename it to .SVC
Since we cannot add a svc file directly, add a text file and rename it to .SVC

Step#9
Prepare the .Svc
Prepare the .Svc

Step#10
Select the Project and go to Properties. Modify the Deployment Target Property as WebApplication
Select the Project and go to Properties. Modify the Deployment Target Property as WebApplication

Step#11
Deploy the solution and test from the Browser by giving the following url
Deploy the solution and test from the Browser by giving the following url
Comments
Post a Comment