Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

WCF Service with MultipleBaseAddressDataServiceHostFactory used shows "Endpoint not found."

$
0
0

Using many manuals in the Net, I've created wcf service to be published in Sharepoint (like  ere: http://blog.sharepointbits.com/2010/04/custom-wcf-services-in-sharepoint-2010_17.html or here: http://sivarajan.me/post/SharePoint-2013-Responsive-WebPart-using-Knockout-with-WCF-REST-Service). It deploys, but .svc and .svc/mex gives me only "Endpoint not found." error.

What should I change for it to work?

Code is like this:

Service.svc:
<%@ServiceHost
     language= "C#"
     Service="Service, $SharePoint.Project.AssemblyFullName$"
     Factory= "Microsoft.SharePoint.Client.Services.MultipleBaseAddressDataServiceHostFactory, 
    Microsoft.SharePoint.Client.ServerRuntime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>

IService.cs:
[ServiceContract]
public interface IService
{
[OperationContract]
bool Method1(CustomObject[] objects);

[OperationContract]
bool Method2(AnotherCustomObject object);

[OperationContract]
bool Method3(AnotherCustomObject object);

[OperationContract]
bool Method4(int ID);
}

Service.cs:
[BasicHttpBindingServiceMetadataExchangeEndpointAttribute]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class Service : IService
{
public bool Method1(CustomObject[] objects) {...}

public bool Method2(AnotherCustomObject object) {...}

public bool Method3(AnotherCustomObject object) {...}

public bool Method4(int ID) {...}
}


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>