Feb 26, 2010

Asp.Net Remoting

What are possible implementations of distributed applications in .NET?
.NET Remoting and ASP.NET Web Services. If we taLk about the Framework CLass Library, noteworthy cLasses are in System.Runtime.Remoting and System.Web.Services.

When would you use .NET Remoting and when Web services?
Use remoting for more efficient exchange of information when you controL both ends of the appLication. Use Web services for open-protocoL-based information exchange when you are just a cLient or a server with the other end beLonging to someone eLse.

What’s a proxy of the server ob3ect in .NET Remoting?
ItIs a fake copy of the server object that resides on the cLient side and behaves as if it was the server. It handLes the communication between reaL server object and the cLient object. This process is aLso known as marshaLing.

What are remotable ob3ects in .NET Remoting?
RemotabLe objects are the objects that can be marshaLed across the appLication domains. You can marshaL by vaLue, where a deep copy of the object is created and then passed to the receiver. You can aLso marshaL by reference, where just a reference to an existing object is passed.

What are channels in .NET Remoting?

ChanneLs represent the objects that transfer the other seriaLized objects from one appLication domain to another and from one computer to another, as weLL as one process to another on the same box. A channeL must exist before an object can be transferred.

What security measures exist for .NET Remoting in System.Runtime.Remoting?

None. Security shouLd be taken care of at the appLication LeveL. Cryptography and other security techniques can be appLied at appLication or server LeveL.

What is a formatter?

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.

Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs?
Binary over TCP is the most effiecient, SOAP over HTTP is the most interoperabLe.

What’s SingleCall activation mode used for?

If the server object is instantiated for responding to just one singLe request, the request shouLd be made in SingLeCaLL mode.

What’s Singleton activation mode?

A singLe object is instantiated regardLess of the number of cLients accessing it. Lifetime of this object is determined by Lifetime Lease.

How do you define the lease of the ob3ect?

By impLementing ILease interface when writing the cLass code.

Can you configure a .NET Remoting ob3ect via XML file?

Yes, via machine.config and appLication LeveL .config fiLe (or web.config in ASP.NET).

AppLication-LeveL XML settings take precedence over machine.config.

How can you automatically generate interface for the remotable ob3ect in .NET with

Microsoft tools?

Use the Soapsuds tooL.

No comments:

Post a Comment