1. | .NET Enterprise Services offers which of the following services?
|
|
2. | Your application design uses queued components. Which design goal indicates that queued components are the best choice for this application?
|
|
3. | To create a .NET component that will be hosted by COM+, what should you do?
|
|
4. | How can you indicate characteristics of your component to .NET Enterprise Services?
|
|
5. | You apply the <ApplicationActivation(ActivationOption.Server)> attribute to your class. What does this mean?
|
|
6. | You apply the <ConstructionEnabled(True)> attribute to your class. What does this mean?
|
|
7. | Given this attribute setting:
<ObjectPooling(Enabled:=True, MinPoolSize:=10, MaxPoolSize:=20)> What can you say about the object’s behavior?
|
|
8. | The definition of a transaction states that there are four important properties of transactions. Which of these is one of those properties?
|
|
9. | You have created a component with attributes that state that a transaction is required. Which scenario best describes how your component works?
|
|
10. | You create a .NET component that will be used by Component Services. What effect will the <AutoComplete(True)> attribute have on your component’s behavior?
|
|
11. | You have created a .NET component that will be used by COM clients. What step should you take to make the component accessible to COM?
|
|
12. | Before your .NET component can be used by Component Services, what step must you take?
|
|
13. | You have created a .NET component that will be used by COM clients. Which .NET Framework namespace must you import in your code to support this capability?
|
|
14. | You would like to use an existing COM component in your Visual Studio .NET project. When you add a reference to the COM DLL, what action does Visual Studio .NET take?
|
|
15. | You would like to call functions from one of the Windows system DLLs from your Visual Studio .NET application. How do you accomplish this?
|
|
Answers
1. | D .NET Enterprise Services offers automatic transaction processing, Loosely Coupled Events, and role-based security to determine which Windows group a user belongs to. |
2. | C Queued components enable you to deliver messages asynchronously to other applications. |
3. | A To enable your components to be hosted by .NET Enterprise Services, you must set a reference to the System.EnterpriseServices.dll. |
4. | D The ServicedComponent class from the .NET Framework class library defines many attributes that can be added to your assemblies, classes, and methods to set their behavioral characteristics. These attributes, including construction strings and security settings, are referenced by .NET Enterprise Services when the component runs. |
5. | B Server components run in their own process. The ActivationOption.Library option directs the component to run in the caller’s process. |
6. | D The ConstructionEnabled attribute indicates that certain runtime parameters will be entered into the Component Services dialog box. |
7. | D Object pooling enables you to specify the number of objects that can be “ready and waiting” when a client asks to instantiate an object. |
8. | B The ACID properties state that a transaction must be consistent, which means that data integrity must be maintained when a transaction is completed. The other ACID properties are Atomicity, Isolation, and Durability. |
9. | B TransactionOption.Required means that an object must run in the context of a transaction. If there is an existing transaction, the object will join that transaction. Otherwise, a new transaction will be started. If you always want to start a new transaction, use the RequiresNew option instead of Required. |
10. | D The AutoComplete attribute states that if a given method completes successfully, the transaction vote for that object will be automatically set to commit the transaction. If any exception occurs, then the vote will be set to abort (or roll back) the transaction. |
11. | B In order for COM clients to use your component, you must export your component’s custom interface by using the Type Library Export tool (tlbexp.exe). The .NET runtime handles creation of IDispatch and IUnknown interfaces for your component, for use by COM clients. You would import a COM component’s type library in order to access that COM component from a .NET project. |
12. | A In order for Component Services to use a .NET component, the component must have an entry in the Windows system Registry; this does not happen automatically. The regsvcs.exe utility that is provided with the .NET Framework does this. The regsvr32.exe utility can be used to register only a COM DLL. |
13. | B The System.Runtime.InteropServices supports interoperability with COM components and clients. The System.Runtime.Serialization namespace includes functions to serialize and deserialize objects for storage and transport. System.Reflection allows access to underlying types. System.EnterpriseServices makes available Component Services, such as queued components, transactions, and so on. |
14. | A Visual Studio .NET creates a .NET interop assembly called Interop.Projectname.dll, in your project’s \bin directory. |
15. | A When calling Win32 API functions (or calling any functions in an unmanaged DLL), you should create a class in your Visual Studio .NET project, which contains the Win32 function declaration. You can then instantiate objects from that class, and any functions declared in that class are seen as methods of your object. |