Thursday, April 2, 2009

.Net Remoting Interview Questions Part II

11. What is a formatter?

Ans. A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end.

12. Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs?

Ans Binary over TCP is the most effiecient, SOAP over HTTP is the most interoperable.

13. What’s SingleCall activation mode used for?

Ans. If the server object is instantiated for responding to just one single request, the request should be made in SingleCall mode.

14. What’s Singleton activation mode?

Ans. A single object is instantiated regardless of the number of clients accessing it. Lifetime of this object is determined by lifetime lease.

15. How do you define the lease of the object?

Ans. By implementing ILease interface when writing the class code.
16. Can you configure a .NET Remoting object via XML file?

Ans. Yes, via machine.config and application level .config file (or web.config in ASP.NET). Application-level XML settings take precedence over machine.config.

17. How can you automatically generate interface for the remotable object in .NET with Microsoft tools?

Ans. Use the Soapsuds tool.

No comments: