top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is Contract? What are the types of Contract in WCF?

+1 vote
1,799 views
What is Contract? What are the types of Contract in WCF?
posted Sep 1, 2015 by Jdk

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

It is the agreement between client and service which specifies:

[ServiceContract] - which services are exposed to the client.

[OperationContract] - which operations the client can perform on the service.

[DataContract] – which data types are passed to and from the service.

[MessageContract] - allow the service to interact directly with messages. Message contracts can be typed or untyped and are useful in interoperability cases when another party has already dictated some explicit (typically proprietary) message format.

[FaultContract] -which errors are raised by the service and how the service handles andpropagates errors to its clients.

answer Sep 2, 2015 by Manikandan J
...