- What are the contracts WCF provides?
- ServiceContract
- OperationContract
- DataContract
- MessageContract
- FaultContract
- How the contracts are implemented?
- All the above contracts are implemented using Attributes
- What are the Message Exchange Patterns in WCF
- Request-Response
- Oneway
- Duplex
- What is the different between Request-Response and Oneway Message exchange?
- OneWay - fire and forget. Message is sent and no reply is received
- HTTP status code: 202 - Accepted, protocol level ACKnowledgement, which indicates that the request has reached the service. That's it. No information after that.
- Request-Response - Message is sent and reply is received
- HTTP status code: 200 - OK
- What is Duplex Message Exchange Pattern? When do you really use it? any real time example?
- Client sends arbitrary number of messages and it is received in any order at server.
- What is the first step in writing a service?
- Define the Contract
- Can a method which is exposed via [OperationContract(IsOneWay=true)], return values?
- No. While hosting the service exception will be thrown, at runtime.
- Unhandled Exception: System.InvalidOperationException: Operations marked with IsOneWay=true must not declare output parameters, by-reference parameters or return values.
- What Serialization engine WCF uses?
- DataContractSerializer - to serialize and de-serialize data.
Thursday, April 26, 2012
WCF - Questions - 1
Subscribe to:
Posts (Atom)