0
votes

I got one interview question in WCF

What is the use of Having multiple contracts for different consumers for a web sevice?

Could any one know the answer for the above questions? Reg WCF question, i explained about DataContract, Service Contract, Message Contract.

1

1 Answers

0
votes

Depends what they mean by different contracts.

If they mean different interfaces, then it could be a security benefit, restricting what you expose to each client.

If it is different endpoint configurations, you could use an efficient binary protocol for clients on the local net, and a compatible basic http binding for external clients. You could also have different authentication methods for each endpoint.