Contracts in WCF
What actualy contract stand for in case of WCF ?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
TulasiRank #2,544 · 549 reputationPosted Nov 16, 2011, 8:57 PM EST
In WCF, all services expose contracts. The contract is a platform-neutral and standard way of describing what the service does.
WCF defines four types of contracts.
1. Service contracts : Describe which operations the client can perform on the service.
2. Data contracts : Define which data types are passed to and from the service. WCF defines implicit contracts for built-in types such as int and string, but we can easily define explicit opt-in data contracts for custom types.
3. Fault contracts : Define which errors are raised by the service, and how the service handles and propagates errors to its clients.
4. Message contracts : Allow the service to interact directly with messages. Message contracts can be typed or untyped, and are useful in interoperability cases and when there is an existing message format we have to comply with
Please mark the answer as Accepted if it helps you.
Priya LingeRank #785 · 2.9K reputationPosted Nov 16, 2011, 8:51 PM EST
Please check below link which includes the Contract in WCF which is as below,
Service Contract
Data Contract
Message Contract
Fault Contract
http://wcftutorial.net/
Hope this will help you.
Thanks.