SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've followed this tutorial and also this one (tried every possible combination of those) to deploy a custom WCF service in Sharepoint 2010.

But I'm not having any luck. Once the service is deployed, I tried to access it and get the annoying and undescriptive error:

XML Parsing Error: no element found
Location: http://mysharepointsite/_vti_bin/folder/service.svc
Line Number 1, Column 1:

I can't find any description of it. There's nothing in the event log.

Any ideas?

Thank you


The .svc file contains the following:

<%@ServiceHost Language="C#" Debug="true"
    Service="MyNamespace.MyServiceClass, $SharePoint.Project.AssemblyFullName$"
    Factory="Microsoft.SharePoint.Client.Services.MultipleBaseAddressBasicHttpBindingServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

I've added the .svc extension to the replaceToken section in the .csproj to get the $SharePoint.Project.AssemblyFullName$ replaced by the actual assembly full name.

share|improve this question
What's in your svc file? – James Love Dec 27 '11 at 19:52
Ensure that the WCF service you deploy in SharePoint is on .NET 3.5. SharePoint 2010 does not support .NET 4 currently. – Amit Kumawat Dec 28 '11 at 5:02
@JamesLove I've updated the answer including the content of the .svc file. – emzero Dec 28 '11 at 19:43
@AmitKumawat Yes, the project is in .NET 3.5. – emzero Dec 28 '11 at 19:43

Follow this steps from this article :

By the way, You can choose to have the WCF without the factory. Just supply the configuration in a separate web.config and place it along with your SVC file.

share|improve this answer
up vote 1 down vote accepted

I've been able to fix this starting from zero following this guide

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.