1. | You are creating a Visual Studio .NET application and you would like to use some existing COM components in your new application. Can you do this?
|
|
2. | What classes must be used to successfully deploy a Windows service when using an installer such as InstallUtil.exe or Windows Installer? (Choose two.)
|
|
3. | You are creating a distributed application. You would like the client applications to use .NET Remoting to make method calls on server components. Which of the following describes an environment that is suited for implementing .NET Remoting?
|
|
4. | What type of application would be best implemented by running as a Windows service?
|
|
5. | You are creating a distributed application. You have decided to implement .NET Remoting to make method calls on server components. You have decided to use a TCP channel and the binary formatter. What advantage will that provide for your application?
|
|
6. | XML Web services are most useful when creating applications that meet which requirements?
|
|
7. | You are creating a Visual Studio .NET application and you would like to take advantage of the distributed transaction management features that Windows Component Services provides. What should you do?
|
|
8. | Which set of underlying technologies provides the foundation for XML Web services?
|
|
9. | To implement Windows authentication and authorization in the web.config file, you must add the ___________________ element to grant access and the ___________________ element to prevent access to your Web service. (Choose two.)
|
|
10. | In a typical web-based application, most data returned by database queries is used to display data to the user. Which ADO.NET object can quickly and efficiently provide read-only data to your application?
|
|
11. | Your application needs to connect to a Microsoft SQL Server 6.5 database. Which .NET data provider should you use?
|
|
12. | What is one advantage of using a strongly typed DataSet in your application?
|
|
13. | For auditing purposes, you would like your Windows service application to write an entry to an event log every time it is started and stopped. How can you most easily accomplish this?
|
|
14. | What is the main benefit of adding XML-aware components to your application?
|
|
15. | Your application requires that you are able to support XML data files as input from your e-commerce trading partners, as well as supply results back to them in many formats of XML data files. What namespaces in the .NET Framework class library contain classes that can help you in your application design?
|
|
16. | How do you easily change the setting of the Level property of a TraceSwitch?
|
|
17. | Authentication is best described as the process of determining:
|
|
18. | If you have set the Level property of a TraceSwitch to TraceInfo, which levels of messages will you receive?
|
|
19. | When you use Visual Studio .NET to generate a strongly typed DataSet, what files are added to the project?
|
|
20. | ASP.NET supports only Windows authentication.
|
|
21. | The CLR role-based security uses Identity and Principal objects to determine role membership.
|
|
22. | Which method of deploying a serviced component should you use to deploy the component into a production environment?
|
|
23. | To authenticate a Web service request, you must use Integrated Windows authentication.
|
|
24. | To enable static discovery, you must create a .disco file and place it in the web application’s virtual root folder.
|
|
25. | How can you best describe a Windows service application?
|
|
26. | To create a .NET component that will be hosted by COM+, what should you do?
|
|
27. | When an object’s lifetime lease expires, what happens?
|
|
28. | When creating an XML Web service application in the .NET Framework, what filename extension is used for your main source code pages?
|
|
29. | In order to read all the rows from a DataReader, which method should you call?
|
|
30. | Which statement best describes the structure of a DataSet?
|
|
31. | Which statement best describes the way that an XmlTextReader works?
|
|
32. | What happens when you set the Level property of a TraceSwitch to TraceError?
|
|
33. | Which of the following best describes .NET Enterprise Services role-based security?
|
|
34. | In order to allow an XML Web service consumer to specify the network credentials to pass into a Web service call, what property of the proxy object would you set to a NetworkCredential instance?
|
|
Answers
1. | B Yes, it is possible to use legacy COM components from Visual Studio .NET projects. Visual Studio .NET will automatically create an interop assembly that exposes the type library from the COM component in a form that is understandable to the Common Language Runtime (CLR). For more information, see Chapter 2. |
2. | A, C The ServiceInstaller and ServiceProcessInstaller classes contain the code necessary for the installer (InstallUtil.exe or Windows Installer) to write to the Registry and register the service in the service controller applet in Windows. These classes contain the code necessary for the installer to install, commit, roll back, and uninstall a Windows service. See Chapter 10 for more information. |
3. | C .NET Remoting is best implemented when all computers are on a closed network and all computers are running the .NET Framework. XML Web services are useful when you must support different platforms. For more information, see Chapter 3. |
4. | A Windows Services are best suited to applications that run without direct user interaction and that report their operations and errors to an event log. For more information, see Chapter 1. |
5. | A The TCP channel does provide faster transmission of data over the network; however, this channel is less secure than HTTP, which can use SSL and other web security features. All components involved in the distributed application must run the .NET Framework in order to use the binary formatter. For more information, see Chapter 3. |
6. | B XML Web services are most suited to creating applications that expose a simple, easy-to- access interface that is nonproprietary and cross-platform. Each of your customers can write application code to call your service and request information from any type of programming language and platform that they might be using. Although XML Web services can provide reasonable performance, because you are often accessing web services over the public Internet, fast performance is not guaranteed. For internal applications, such as intranets and online transaction processing, web services might not provide the best performance and security. For more information, see Chapter 4. |
7. | B You can register Visual Studio .NET components with Windows Component Services to take advantage of distributed transaction management and other features. Visual Studio .NET components that are to be registered with Windows Component Services must reference the .NET Framework System.EnterpriseServices namespace and inherit from the Serviced- Component base class. For more information, see Chapter 2. |
8. | C XML Web services use Internet standards such as HTTP, XML, and SOAP to maintain the greatest possible cross-platform accessibility. TCP implies the use of a lower-level protocol that might be blocked by a firewall. DCOM and binary data formats are generally proprietary and will run only on a single platform. XSD and UDDI are supporting technologies of XML Web services; however, they provide additional services and are not required for a simple XML Web service. For more information, see Chapter 4. |
9. | A, B The <allow> element is used to permit users to consume the service, and the <deny> element is used to prohibit access. For more information, see Chapter 11. |
10. | C A DataSet object is designed to store data in memory while users can update it and write changes back to the database. This capability uses system resources and is slower. An XMLDataReader creates an XMLDocument, which also requires system resources to hold data in memory. The SqlDataReader and OleDbDataReader are fast and efficient objects that provide forward-only, read-only access to data. The disconnected recordset is part of the older ADO object model and is not a part of ADO.NET. For more information, see Chapter 5. |
11. | B The OleDb data provider supports many databases, including older versions of Microsoft SQL Server and Access. The SqlClient data provider is customized for use with Microsoft SQL Server versions 7 and 2000 only. The ODBC data provider is for legacy databases that must use ODBC drivers. For more information, see Chapter 5. |
12. | B Strongly typed DataSets provide compile time type checking of your data columns. Object names are also available in Intellisense. No SQL is automatically generated for the typed DataSet; it is built based on a SELECT query that you define. You do still need to call the DataAdapter Fill and Update methods when working with a typed DataSet. Any type of DataSet can be bound to controls. See Chapter 6 for more information. |
13. | C The default behavior of a Visual Studio .NET Windows service application is to automatically log Start, Stop, Pause, and Continue operations in the Windows Application event log. For more information, see Chapter 1. |
14. | B One of the main benefits of working with XML data is that it is a standard, nonproprietary, cross-platform format for data. It is easy to produce XML output that can be sent to other applications and easy to use XML input that is sent to you from outside sources. Although XML is often thought of as a web technology, the use of XML alone will not convert your application to a web page or web service. XML is mainly a means of moving data, not a component framework for sharing application logic. For more information, see Chapter 7. |
15. | D The .NET Framework class library has broad-based support for working with XML data. Although classes in System.Xml support core XML technologies such as XML Document Object Model programming and XSLT, ADO.NET (System.Data) and many other namespaces also contain XML-aware components. For more information, see Chapter 7. |
16. | A Using a configuration file to set the switch level enables you to change the setting as often as required without having to recompile source code. See Chapter 8 for more information. |
17. | C Authentication is the process of demonstrating to the system your identity. For more information, see Chapter 9. |
18. | D When you set a specific trace level, you automatically include all messages that are at a more critical level. So if you test for Trace.Info, you will also include Trace.Warning and Trace.Error as well. Trace.Verbose is the least critical level, so it will not be included. See Chapter 8 for more information. |
19. | A A strongly typed DataSet is described by an XSD Schema. A class module is added to the project that contains DataSet properties, methods, and events that are customized for the particular data definition. See Chapter 6 for more information. |
20. | B ASP.NET supports Windows, Passport, Forms, and custom authentication. For more information, see Chapter 9. |
21. | A The CLR role-based security uses Identity and Principal objects to determine role membership. For more information, see Chapter 9. |
22. | C Using an MSI file and the Windows Installer is the recommend approach to installing an application into a production environment. See Chapter 10 for more information. |
23. | B You can also use custom authentication. Passport and Forms authentication, provided by ASP.NET, are not recommended for XML Web service authentication. For more information, see Chapter 11. |
24. | A The presence of a .disco file in the virtual root of a web application will enable static discovery. For more information, see Chapter 11. |
25. | B A Windows service runs in its own memory process space and has its own security account, most commonly LocalSystem. A Windows service does not interfere with other users or programs running on the computer. For more information, see Chapter 1. |
26. | A To enable your components to be hosted by .NET Enterprise Services, you must set a reference to the System.EnterpriseServices.dll. For more information, see Chapter 2. |
27. | B When the object’s lifetime lease expires, it is marked as available for garbage collection by the CLR. For more information, see Chapter 3. |
28. | C When working with ASP.NET-based XML Web services, .asmx is the filename extension used for your source code pages. The extension .aspx is used for standard ASP.NET pages. The .wsdl and .disco files contain XML documents that provide discovery and Web Services Description Language information. For more information, see Chapter 4. |
29. | C The Read method is used to advance the DataReader to the next row of data. The NextResult method is used when several SQL queries were run as a batch and there are multiple resultsets in a single DataReader. The MoveNext method was used with older versions of the ADO recordset and is not used in ADO.NET. The GetValues method is for retrieving column data. For more information, see Chapter 5. |
30. | C A DataSet contains a collection of DataTables. The DataTable in turn contains the DataColumns and DataRows collections. The DataSet, not the DataTable, also contains the collection of DataViews, available through the DataViewManager. The first option describes a RecordSet object from the older ADO object model. For more information, see Chapter 6. |
31. | B The XmlTextReader provides forward-only, read-only access to XML data. The XML DOM XmlDocument provides complete programmatic access to XML data. The XmlDataDocument enables you to treat your data as either a relational table or a hierarchical tree of nodes. There is no class that automatically converts text files to XML. For more information, see Chapter 7. |
32. | D You can test for the Level property of a TraceSwitch and use that information to determine which messages should be output. Trace statements can be placed in an error handler or anywhere else in code. Trace statements are output during the normal course of application execution, not only if a runtime error occurs. Message boxes that force the application to break are the typical behavior of Trace.Assert statements. For more information, see Chapter 8. |
33. | D .NET Enterprise Services role-based security requires that classes using it inherit from the ServicedComponent class, as with any class taking advantage of Enterprise Services such as transactions and message queuing. It does not require that the programmer access any other .NET Enterprise Services in their code. It peacefully coexists with the newer CLR role-based security model; each has advantages and disadvantages that make one or the other the best choice in a specific circumstance. Unlike the CLR role-based security model, .NET Enterprise Services role-based security enables users to be assigned to roles that do not correspond to Windows groups. For more information, see Chapter 9. |
34. | A The Credentials property of the proxy object is what should be valued and passed to the service. There isn’t an AuthInfo, Identity, or Principal property for all proxy instances. For more information, see Chapter 11. |