WCF Interview Questions and Answers Part 13

1. Is it mandatory to give access specifiers in contract while creating interface in wcf?
Ans. No need to give acccess specifiers.

namespace SampleService
    public interface IService
        List<Employee> GetEmployees();

2. What are the transfer modes in wcf?
Ans. Buffered, Streamed, StreamRequest, StreamResponse

3. What is the benefit of Streamed mode compare to Buffered mode?
Ans. Streamed transfers can improve the scalability of a service by eliminating the requirement for large memory buffers. 
If you want to transfer large message, streaming is the best method.

4. What are the native channels for streamed mode?
Ans. Native channels are IRequestChannel and IReplyChannel

5. What are teh native channels for buffered mode?
Ans. Native channel shape is IDuplexSessionChannel

6. Which bindings does streamed mode not supports in wcf?
Ans. Message Queuing (MSMQ) transport and Peer Channel transport

7. Which classes is the base class for Stream mode in wcf?
Ans. WCF uses .Net stream class for Streaming the message.

8. How do you sent messages for transfer mode streamed over channels in wcf?
Ans. We need to serialize the stream classes first before sending.

9. Does all streams will support serialization?
Ans. No. For example, FileStream is non serializable, and it will not support streaming

10. What are the bindings supported by streamed mode in wcf?
Ans. Only the TCP, IPC, and basic HTTP bindings support streaming. 


Receive Quality Tutorials Straight in your Inbox by submitting your Email below:

Delivered by FeedBurner

Protected by Copyscape Duplicate Content Checker