views:

120

answers:

2

Can I get RESTful WCF services working in my sharepoint site?

+2  A: 

Key points:

  • Add the WCF config to the web.config of your SharePoint site.

  • Configure the services to run in ASP.NET compatibility mode. This ensures they run through the ASP.NET pipeline that is necessary for SharePoint.

  • Create a path to hold the .svc files in the IIS web site directory. Set it to unmanaged so SharePoint doesn't interfere.

  • Deploy the DLL for the service.

There is a lot of detail that won't fit here. Read Sahil Malik's posts for complete examples and more information on how to do all of the above, plus more techniques such as packaging in solutions. There's also an article by Steve Fox that's also quite detailed.

If you'd like to go in-depth with WCF including a chapter on integrating it with SharePoint, read Developing Service-Oriented AJAX Applications on the Microsoft® Platform by Daniel Larson.

Alex Angas
+1  A: 

Yes. You have a couple of options. Take a look at a wiki page I wrote up on this several months ago.

http://wiki.threewill.com/display/enterprise/Hosting+WCF-like+REST+and+JSON+Services+in+SharePoint

Kirk Liemohn