wcf class implementing two operation contracts in different service contracts with same name

Posted by Archie on Stack Overflow See other posts from Stack Overflow or by Archie
Published on 2010-05-12T09:30:47Z Indexed on 2010/05/12 9:34 UTC
Read the original article Hit count: 333

Hello,

I have declared two service contracts as follows:

[ServiceContract]
public interface IContract1
{
    [OperationContract]
    double Add(int ip);
}

[ServiceContract]
public interface IContract2
{
    [OperationContract]
    double Add(double ip);
}

I have a class which implements these two contracts. I have created two end points for both the contracts. But I'm not able to access the service from client code. It displays a big error when i try to update the service reference as:

Metadata contains an error that cannot be resolved.... There was no endpoint listening at ... etc.

I know that you can't have two OperationContracts with the same name but is it possible to have two operation contracts in different service contracts with same name but different signature? Thanks.

© Stack Overflow or respective owner

Related posts about wcf

Related posts about operationcontract