You work as the Microsoft.NET developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003.
The implementation of asynchronous calls and remoting events form part of your responsibilities at Domain.com. You have created a Microsoft.NET Remoting component that will import data into a database. The Microsot.NET Remoting component seems to work but you had complaints regarding sluggish client-side performance. To this end you need to apply the OneWay attribute to methods in the component so as to improve the client-side performance.
What should you do?
A.
Apply the OneWay attribute to methods that do not have only output parameters.
B.
Apply the OneWay attribute to methods that do not have input parameters.
C.
Apply the OneWay attribute to methods that do not have return values.
D.
Apply the OneWay attribute to methods that are not overloaded.
Explanation:
Remote methods marked with the OneWay attribute does not send responses back to the client and as such cannot have return values, reference parameters, or output parameters. Thus to improve client-side performance you should apply the OneWay attribute to the methods that has no return values.
Incorrect answers:
A: Remote methods that are marked with the OneWay attribute cannot have return values, reference- or output parameters. Thus you should not apply the attribute to methods that has only output parameters.
B: Since Remote methods marked with the OneWay attribute do not send responses back to clients, you should not apply the attribute to methods that do not have input parameters.
D: You should not apply the attribute to methods that are not overloaded. There are no additional restrictions on overloaded methods, but because Remote methods marked with the OneWay attribute do not send responses back to the client, they cannot have return values, reference- or output parameters.