What should you do?

You are converting an application to use .NET Framework remoting.

The server portion of the application monitors stock prices and contains a class named StockPriceServer, which is a Server Activated Object (SAO).
The client computer interacts with the server using a common assembly.
When the server attempts to raise an event on the client computer, the server throws the following exception.System.IO.FileNotFoundException.
You discover that the event delegate is not being called on the client computer. You need to ensure that the server application can raise the event on the client computer.

What should you do?

You are converting an application to use .NET Framework remoting.

The server portion of the application monitors stock prices and contains a class named StockPriceServer, which is a Server Activated Object (SAO).
The client computer interacts with the server using a common assembly.
When the server attempts to raise an event on the client computer, the server throws the following exception.System.IO.FileNotFoundException.
You discover that the event delegate is not being called on the client computer. You need to ensure that the server application can raise the event on the client computer.

What should you do?

A.
Add the Serializable attribute to the StockPriceServer class and change the event to use one of the standard common language runtime (CLR) delegates.

B.
In the common assembly, add an interface that contains the event and a method to raise the event.
Implement that interface in the StockPriceServer class and use the interface’s event to register the delegate message on the client computer.

C.
Add the event delegate to the common assembly.
Implement the Add delegate and the Remove delegate methods of the event in the StockPriceServer class to reference the delegate method in the client application.

D.
Raise the event using the BeginInvoke method and pass a reference to the client computer.



Leave a Reply 0

Your email address will not be published. Required fields are marked *