Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

UPDATE

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=14.0.0.0, 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
add comment

2 Answers

Follow this steps from this article : http://msdn.microsoft.com/en-us/library/ff521581.aspx

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
add comment
up vote 1 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

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.