RS developer
RS developer

Reputation: 187

WCF service with 2 service contracts

I wonder if this is possible.

I have a existing WCF service, being consumed by 8 clients. I have a new requirement of a new operation to be exposed for 2 clients, but don't want that the other 6 clients should be made aware of it. So if I add this new Operation to existing ServiceContract all the clients will have to update their reference.

Is this possible I make a new service contract which has all the Operations of the existing one plus the new operation, and the 2 client who want this operation can use new ServiceContract and other 6 clients keep using the existing service contract.

Upvotes: 1

Views: 472

Answers (1)

DaveRead
DaveRead

Reputation: 3413

Yes, this is possible. Add a new endpoint that implements a separate interface and have the 2 clients add reference for the new supplementary interface. The existing service can work as it did previously.

Upvotes: 1

Related Questions