WCF Interview Questions and Answers Part 12

1. For which type of wcf application .svc file is generated?
Ans. If your service is webhosted, it uses an *.svc file and for self-hosted applications, there is no svc file.

2. Can we pass reference of an object to services in wcf?
Ans. service operations do not pass references to objects

3. How can we pass references of an object to services in wcf?
Ans. Services pass copies of the objects.

4. Why we cannot pass references of an object to services in wcf?
Ans. Since each type used in a parameter or return value must be serializable.

5. Can managed classes support multiple inheritances?
Ans. Managed classes do not support multiple inheritance.

6. How can we implement versioning in wcf?
Ans. You can version your service by implementing the old interface and the new one. 
     Old clients connect to the original version, while newer clients can connect to the newer version.

7. Can we override operations of service contract in wcf?
Ans. When inheriting from other service contract interfaces, you cannot override operation properties, 
     such as the name or namespace. If we try to do so, it will create new operation in the current service.

8. Which attribute is used to group operation contracts in wcf?
Ans. ServiceContractAttribute is used to group operation contracts.

9. What are the wcf patterns ?
Ans. Three patterns in the WCF programming model: request/reply, one-way, and duplex message patterns.






Subscribe

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

Delivered by FeedBurner

Protected by Copyscape Duplicate Content Checker