What should you do?

You work as the application developer at Domain.com. Domain.com uses Visual Studio.NET 2005 as its application development platform.
You are developing a .NET Framework 2.0 Remoting application with the name of your class BillType and the name of the assembly TestAssembly which will be accessed using the Transmission Control Protocol (TCP) at port 1234.
You are required to expose BillType as a server-activated object for remote access whilst you must use a configuration file to register the remote object.
What should you do?

You work as the application developer at Domain.com. Domain.com uses Visual Studio.NET 2005 as its application development platform.
You are developing a .NET Framework 2.0 Remoting application with the name of your class BillType and the name of the assembly TestAssembly which will be accessed using the Transmission Control Protocol (TCP) at port 1234.
You are required to expose BillType as a server-activated object for remote access whilst you must use a configuration file to register the remote object.
What should you do?

A.
<configuration>
<system.runtime.remoting>
<application>
<service>
<activated type = “BillType, TestAssembly”/>
</service>
</application>
</system.runtime.remoting>
</configuration>

B.
<configuration>
<system.runtime.remoting>
<application>
<client url=”tcp://localhost:1234/BillType.rem”>
<activated type =”BillType, TestAssembly”/>
</client>
</application>
</system.runtime.remoting>
</configuration>

C.
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown mode = “Singleton”
type =”BillType, TestAssembly”objectUri=”BillType.rem”/>
</service>
</application>
</system.runtime.remoting>
</configuration>

D.
<configuration>
<system.runtime.remoting>
<application>
<client>
<wellknown type=”BillType, TestAssembly”url=”tcp://localhost:1234/BillType.rem”/>
</client>
</application>
</system.runtime.remoting>
</configuration>

Explanation:

In order to successfully set up an object for remote access the configuration used in the answer is the proper method if you want the object to be activated as a server object.
Incorrect Answers:
A, B, D: The usage of the <client> element is incorrect as this will be used to configure a program that will consume the remote object and in the scenario you must expose an object for remote access.



Leave a Reply 1

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


mr_tienvu

mr_tienvu

I choose