PrepAway - Latest Free Exam Questions & Answers

What should you do?

You write a .NET Framework remoting application that broadcasts messages to client computers through a central server by raising events on the client computers.
Message details are contained in an argument in the event delegate, as shown in the following code segment.

public delegate void MessageArrivedHandler(BroadcastEventArgs args);

public class BroadcastEventArgs
{
public string Message;
public string Sender;
public DateTime TimeSent;
}

You need to ensure that the client computer can access the message details contained in the event argument.
Your solution cannot change the common language runtime (CLR) security restrictions.

What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Add the well-known type named BroadcastEventArgs in the server and configure the WellKnownObjectMode mode as SingleCall.

B.
Change the BroadcastEventArgs class so that it extends the MarshalByRefObject object.

C.
Apply the Serializable attribute to the BroadcastEventArgs object.

D.
In the client application’s remoting configuration file, make the BroadcastEventArgs class a client-activated object (CAO) that points to the server.


Leave a Reply