I have a class implementing a service contract. Another class being derived from this class and in turn implements another service contract
Class A: a.IA
{
}
Class B: A, b.IB
{
}
How do I expose the endpoints for contract IB?
The endpoints I tried:
<service name="B">
<endpoint address="ep1" binding="webHttpBinding" contract="a.A1" />
<endpoint address="ep2" binding="webHttpBinding" contract="b.B1" />
</service>
If I do this, it gives error
Service 'B' implements multiple ServiceContract types, and no endpoints are defined in the configuration file. WebServiceHost can set up default endpoints, but only if the service implements only a single ServiceContract. Either change the service to only implement a single ServiceContract, or else define endpoints for the service explicitly in the configuration file.
Thanks in advance.
EDIT
the config had a typo above.
<service name="B">
<endpoint address="ep1" binding="webHttpBinding" contract="a.IA" />
<endpoint address="ep2" binding="webHttpBinding" contract="b.IB" />
</service>
The template I am using for this is WCF Rest template 4.0 (if it makes any difference)