WCF and SharePoint

by | May 30, 2011 | SharePoint | 0 comments

WCF and SharePoint

Recently I was checking options to utilize WCF together with SharePoint. In SharePoint 2007 it was difficult but SharePoint 2010 is different story as it was written in .net 3.5, which fully support WCF. Creating WCF and putting it into SharePoint hive is simple, you need just to remember about a few things:

1. Your implementation class needs following information

[BasicHttpBindingServiceMetadataExchangeEndpointAttribute] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] It will allow SharePoint to automatically create a metadata exchange endpoint for your service


2. You need your own SVC file like this one:<%@ServiceHost Language=”C#” Debug=”true” Service=”MyNameSpace.MyService, $SharePoint.Project.AssemblyFullName$” Factory=”Microsoft.SharePoint.Client.Services.MultipleBaseAddressBasicHttpBindingServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>

This Token is Dll of Microsoft.SharePoint.Client.ServerRuntime

 

All works fine and there’s no problem with utilize WCF via C# application or SharePoint Designer. But funny thing. When I was trying to useit with InfoPath it doesn’t work… I mean InfoPath can’t understand XML schema of such service. I was trying all solutions and nothing. I even posted the problem on the SharePoint forum , but there’s no feedback and I saw similar problems on the Internet from other users.

[adblockingdetector id=”5770e6ed85560″]




			

Written by Tomasz Szulczewski

Hi, my name is Tomasz Szulczewski, and I have been in love with information technology for over 25 years, but I still have an IT passion and feel like a geek. I am a person who is problem solver who thinks that not all people must be experts in IT.

Related Posts

What is SharePoint in Office 365?

What is SharePoint in Office 365?

What is SharePoint in Office 365, and why is SharePoint for small business the critical product? So you bought a Microsoft 365 license, and your tenant is online. You open a browser, and you have no idea what to do next? Don't worry; I will try to give you a few...

read more
Hubfly

Hubfly

A few days ago I have a chance to play with SharePoint online solution called Hubfly and I was really impressed with his capabilities. And here is my review. So let’s start from the begging. I wrote a few times on this blog that the main problem with SharePoint is...

read more

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.