3

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.

4
  • What's in your svc file?
    – James Love
    Dec 27, 2011 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. Dec 28, 2011 at 5:02
  • @JamesLove I've updated the answer including the content of the .svc file.
    – empz
    Dec 28, 2011 at 19:43
  • @AmitKumawat Yes, the project is in .NET 3.5.
    – empz
    Dec 28, 2011 at 19:43

2 Answers 2

2

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.

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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