WCF Http service multiple endpoints problem

Topics: Web Api
Mar 16, 2011 at 12:45 PM

Hi,

I'm trying upgrade an existing WCF service so that it has two endpoints:

  • existing endpoint as configured in web.config
  • WCF Http endpoint as configured in Global.asax.cs

When I try to access the service via the new WCF Http endpoint I get the following error:

The Service contains multiple ServiceEndpoints with different ContractDescriptions which each have Name='ISearchService' and Namespace='http://tempuri.org/'.  Either provide ContractDescriptions with unique Name and Namespaces, or ensure the ServiceEndpoints have the same ContractDescription instance.

This is where I start to get lost.  I assume the following

  • Name (ISearchService) should not change between the endpoints
  • Namespace can change for each endpoint

Is that right?

I'm not really sure how to proceed because I don't fully understand my options.  i.e should I even be trying to use the same ContractDescription in this case?

I would appreciate if anyone can give me some guidance on how to go about solving this problem.

If it helps, I am using a custom HttpHostConfiguration:

public class SearchServiceHttpHostConfiguration : HttpHostConfiguration, IProcessorProvider, IInstanceFactory

Cheers,

Dave