This project contains a web application level feature which will add WCF support to an existing SharePoint 2007 website.
SharePoint as a WCF host
Specifically there are 4 easy steps -
Create a WCF Home
. This is the virtual directory that will host all your WCF endpoints.
Create a WCF Service Library
, and throw it in the GAC.
Create a relevant .svc file
in the WCF home you created in
Write a WCF Virtual Path Provider
, and register it in the SharePoint site.
Once you have read the above and thus understand the basics, then use this project to reduce the above steps to fewer simpler steps:
To add WCF support to your SharePoint site, simply use the following steps -
a) Download this project (Duh!)
b) Install the solution (or feature) --- I haven't made the solution yet. Will do that soon.
c) Through Central Admin --> Application Management --> Manage Web Application Features .. activate the feature to the website you are trying to add WCF support to. The feature you wanna activate looks like this -->
d) Create a wcf home, which is as simple as Create a directory under the virtual directory that hosts your SharePoint site. Example - c:\inetpub\wwwroot\wss\virtualdirectories\80\_wcf
e) That's it. Now start throwing your endpoints in there.
Windows 2008 specific instruction -
You may need to run the following command to fix the Mime types and IIS Metabase
"%windir%\\Microsoft.NET\\Framework\\v3.0\\Windows Communication Foundation\\ServiceModelReg.exe\" -r -y
For more details, please read:
Host a WCF Service in IIS 7 & Windows 2008 - The right way