|
Question |
Rating |
View Answer |
|
You are developing a order-processing application that retrieves data from a Microsoft SQL Server database contains a table named XYZCustomers and a table named Orders. Customer has a primary key of customerID. Each row in orders has a CustomerID that indicates which customer placed the order. Your application uses a DataSet object named ordersDataSet to capture customer and order information before it applied to the database. The ordersDataSet object has two Data Table objects named Customers and Orders. You want to ensure that a row cannot exist in the Orders Data Table object without a matching row existing in the customers Data Table object. Which two actions should you take? (Each correct answer presents part of the solution. Choose two.) A. Create a foreign key constraint named ConstraintOrders that has Orders.CustomersID as the parent column and Customers. CustomerID as the child column. B. Create a foreign key constraint named ConstraintCustomers that has Customers.CustomerID as the parent column and Orders.CustomerID as the child column. C. Create a unique constraint named UniqueCustomers by using the Customers.CustomerID D. Add ConstraintOrders to the Orders Data Table. E. Add ConstraintOrders to the Customer Data Table. F. Add ConstraintCustomers to the Orders Data Table. G. Add ConstraintCustomers to the Customers Data Table. H. Add UniqueCustomers to the Customers Data Table.
|
|
View Answer |
|
You are developing an application that queries a table named Products in a Microsoft SQL Server database. The query will be stored in a string variable named EXQuery. The query includes the following SQL code. SELECT * FROM Products For XML AUTO You must iterate the query results and populate an HTML table with product information. You must ensure that your application processes the results as quickly as possible. What should you do? A. Use a SqlDataAdapter object and set its SelectCommand property to EXQuery. Use the Fill method of the SqlDataAdapter object to read the data into a DataSet object.. Loop through the associated rows to read the data. B. Use a SqlDataAdapter object and set its SelectCommand property to EXQuery. Use the Fill method of the SqlDataAdapter object to read the data into a DataSet object. Use the ReadXml method of the DataSet object to read the data. C. Set the SqlCommand object’s Command Text to EXQuery. Use the ExecuteReader method of the SqlCommand object to create a SqlDataReader object. Use the Read method of the SqlDataReader object to read the data. D. Set the SqlCommand object’s Command Text to EXQuery. Use the ExecuteXmlReader method of the SqlCommand object to create a XmlReader object. Use the XmlReader object to read the data.
|
|
View Answer |
|
You create a .NET Remoting object named EXPatientinfo that exposes medical patient information. Because of the confidential nature of the information, you must ensure that the data remains secure. You want client applications to connect to EXPatientinfo over a secure communication channel. You want to accomplish this task by writing the minimum amount of code. What should you do? A. Create your own host application and use a TcpChannel and BinaryFormatter. B. Create your own host application and use an HttpChannel and a SoapFormatter. C. Install EXPatientinfo in an Internet Information Services (IIS) virtual directory. Configure EXPatientinfo to use a TcpChannel and a BinaryFormatter. Configure IIS to use SSL. D. Install EXPatientinfo in an Internet Information Services (IIS) virtual directory. Configure EXPatientinfo to use an HttpChannel and a SoapFormatter. Configure IIS to use SSL. |
|
View Answer |
|
You are creating an XML Web service that generates a SOAP message. Parameter information in the SOAP message must be encrypted. You write the appropriate code to modify the SOAP message. You also write a method named Encrypt. This method takes a string an argument, encrypts the string, and returns a new string that contains the encrypted string. Before encryption , the Body element of the SOAP message will be written in the following format. <soap:Body> <returnToSender xlmns = http://XYZ.com/> <aString>some date</aString> </returnToSender> </soap:Body> After encryption, the Body element must be written in the following format. <soap:Body> <returnToSender xmlns = “http://XYZ.com/”> 154 37 146 194 17 92 32 139 28 42 184 202 164 18 </returnToSender> </soap:Body> You write code to isolate the <returnToSender> XML node in an XmlNode object named theNode. You now need to write code to encrypt the parameter information. Which code segment should you use? A. Dim encrypted as String = Encrypt(theNode.InnerText) theNode.OuterXml = encrypted B. Dim encrypted as String = Encrypt(theNode.InnerXml) theNode.OuterXml = encrypted C. Dim encrypted as String = Encrypt(theNode.InnerXml) theNode.InnerXml = encrypted D. Dim encrypted as String = Encrypt(theNode.OuterXml) theNode.OuterXml = encrypted E. Dim encrypted as String = Encrypt(theNode.InnerText) theNode.InnerText = encrypted
|
|
View Answer |
|
You are creating an XML Web service that processes highly confidential messages. The service exposed a Web method named RetrieveMessage that takes as input a code name and returns an encrypted message. You create a SOAP extension and override the extension’s ProcessMessage method so that you can encrypt the message before it is sent back to the caller. You need to encrypt only the data within the RetrieveMessageResult node of the SOAP response. You create a function named EncryptMessage that encrypts the RetrieveMessageResult node. You need to ensure that this method gets called before sending the message back to the caller. During which SoapMessageStage should you call EncryptMessage? A. BeforeSerialize B. AfterSerialize C. BeforeDeserialize D. AfterDeserialize
|
|
View Answer |
|
You have DataSet object named LoanCustomersDataSet that contains customers serviced by the loan department of XYZ. You receive a second DataSet that contains customers serviced by the asset management department of XYZ. Both objects have the same structure. You want to merge assetCustomersDataSet into LoanCustomersDataSet and preserve the original values in loanCustomersDataSet. Which code segment should you use? A. loanCustomersDataSet.Merge (assetCustomersDataSet) B. loanCustomersDataSet.Merge (assetCustomersDataSet, True) C. assetCustomersDataSet.Merge (loanCustomersDataSet) D. assetCustomersDataSet.Merge (loanCustomersDataSet, True)
|
|
View Answer |
|
You create an XML Web service named TimeService. Each time TimeService is started, it checks for the existence of an event log named TimeServiceLog. If TimeServiceLog does not exist, TimeService creates it. You discover that when TimeService creates TimeServiceLog, it throws a System.Security.SecurityException. The exception includes the following message: “Requested registry access is not allowed”. You need to resolve this problem. What should you do?. A. Configure Inetinfo.exe to run as the local administrator user account. B. Create an installer for TimeService, and create the new event log in the installer code. C. Modify the Web.config file by adding an identity element to impersonate the LOGON user specified by Internet Information Services (IIS). D. Modify the permissions of the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesEventlog registry key to give full control to the IUSR_computername user account.
|
|
View Answer |
|
You are creating an XML Web service that will be accessed by callers who cannot use SSL encryption because if firewall restrictions. To protect sensitive data, you want to encrypt a portion of the data returned from the service by using objects in the Cryptography namespace. The service will use a standard encryption routine to encrypt the data before it is sent to the caller. The caller will decrypt the data by using instructions provided by you. You need to write code to encrypt the sensitive data that is in a local variable named XYZData. First, you create an instance of a Cryptography Service Provider. What should you do next? A. Create an Encryptor object that passes in a key and an initialization vector (IV) as parameters. Call the GetHashCode method of the Encryptor object to generate a new hash code. Convert the generated hash code to a stream and use the CryptoStream object to write the value of the hash code to an encrypted stream. Convert the output stream to a string. B. Create a UnicodeEncoding object and use it to encode the value of XYZData into a byte array. Use the ComputeHash method of the Cryptography Service Provider to create a hash from the encoded byte array. Convert the output of ComputeHash from a byte array to a string. C. Create a UnicodeEncoding object and use it to encode the value of XYZData into a byte array. Use the GetHashCode method of the Cryptography Service Provider to create a hash from the encoded byte array. Convert the output of GetHashCode from a byte array to a string. D. Create an Encryptor object that passes in a key and an initialization vector (IV) as parameters. Create a CryptoStream object that passes in an output stream and the Encryptor object as parameters. Convert XYZData to a stream and use the CryptoStream object to write the value of XYZData to an encrypted stream. Convert the output stream to a string.
|
|
View Answer |
|
You create a DataSet object named XYZProductsDataset that contains product information from a Microsoft SQL Server database. This object has a primary key on a column named ProductID. You want to create a new DataSet object that has the same structure as XYZProductsDataset, including the primary key. You want the new DataSet object to be empty of data. Which code segment should you use? A. Dim NewDataSet As DataSet = XYZProductsDataset.Clone B. Dim NewDataSet As DataSet = XYZProductsDataset.Copy C. Dim NewDataSet as New DataSet ( ) newDataSet.Tables.Add (“XYZProductsDataset”) D. Dim newDataSet as New Dataset ( ) newDataSet.Tables.Add (XYZProductsDataset.Tables (0))
|
|
View Answer |
|
You develop a Windows-based application named MyWinApp that contain a Windows Form named XYZ1. To MyWinApp, you add a Web reference to an XML Web Service named Service1. Service1 exposes two Web methods named Authentication and RetrieveData. Both methods have sessions enabled. Authenticate authenticates a caller. If the caller is authenticated, Authenticate creates a unique key, stores that key by using the Session object, and returns that key. RetrieveData expects a valid key that has been generated by Authenticate as input before it will return data. If the key matches the key in the current session, retrieveData will return data to the customer. You write the following code segment in the Page_load event of XYZ1. (Line numbers are included for reference only) 01 Dim service1 As New localhost.Service1 ( ) 02 Dim key As String 03 Dim userData As DataSet 04 ‘ Insert new code. 05 key = service1.Authenticate (myUser, myPassword) 06 userData = service1.RetrieveData (key) 07 DataGrid1.DataSource = userData You run the application. When line 06 executes, the Web service returns an exception, which indicates that the key is invalid. To ensure that the application runs without exceptions, you must insert additional code on line 04. Which code segment should you use? A. service1.PreAuthenticate = True B. service1.InitializeLifetimeService() C. service1.CookieContainer = New _ System.Net.CookieContainer() D. Dim cookie As New System.Net.Cookie(“Key” , key)
|
|
View Answer |
|
You are creating a .NET Remoting object named XYZPayroll. The XYZPayroll class allows remote client applications to access payroll data for your company. Client applications are developed by using Windows Forms and Web Forms. You must ensure that remote client applications are securely authenticated prior to gaining access to Payroll object. You want to accomplish this task by writing the minimum amount of code. What should you do? A. Use a TcpChannel and a BinaryFormatter for the XYZPayroll class. B. Use an HttpChannel and a SoapFormatter for the XYZPayroll class. C. Host the XYZPayroll class in Internet Information Services (IIS) and implement Basic authentication. D. Host the XYZPayroll class in Internet Information Services (IIS) and implement Integrated Windows authentication.
|
|
View Answer |
|
You are preparing to deploy an XML Web service named XYZInventoryService. This service queries a Microsoft SQL Server database and return information to the caller. You are Visual Studio .Net to create a setup project. You need to install XYZInventorySystem. You also need to run a script to create the necessary SQL Server database and tables to store the data. To accomplish this, you need to configure the project to have administrator rights to the SQL Server database. You add a custom dialog box to the project that prompts the user for the administrator user name and password that are used to connect to the SQL Server database. You need to make the user name and password available to a custom Installer class that will execute the script. What should you do? A. Add a launch condition that passes the user name and password to the Install subroutine. B. Add a merge module to the project that captures the user name and password. Use the merge module to access these values in the Install subroutine. C. Retrieve the user name and password from the savedState object in the install subroutine. D. Create a custom install action. Set the CustomActionData property to the entered user name and password. Then access these values in the Install subroutine.
|
|
View Answer |
|
You have a DataSet object that contains a single DataTable object named XYZEmployees. XYZEmployees has a column named EmployeeID. EmployeeID contains no duplicate data. You are creating a function that accepts a parameter of EmployeeID and searches Employees to return the DataRow object for the specified EmployeeID.. You want to use the Find method of the rows collection in XYZEmployees to return the requested DataRow object from the function. You need to ensure that you can use the Find method to accomplish this goal. What should you do? A. Ensure that EmployeeID is the first column in XYZEmployees. B. Ensure that EmployeeID is unique for each row in XYZEmployees. C. Ensure that XYZEmployees has a primary key on EmployeeID. D. Ensure that XYZEmployees is sorted in ascending order on EmployeeID.
|
|
View Answer |
|
Your Microsoft SQL Server database contains a table named XYZOrders. XYZOrders is used to store new purchase orders as they are entered into an order-entry application. To keep up with customer demand, the order fulfillment department wants to know at 15-minute intervals when new orders are entered. You need to develop an application that reads XYZOrders every 15 minutes and sends all new orders to the order fulfillment department. The application will run on computer that is used by several users who continuously log on and log off from the network to perform miscellaneous tasks. Which type of .NET application should you use? A. Windows Form B. Windows service C. XML Web service D. .NET Remoting object
|
|
View Answer |
|
You are creating an XML Web service named InventoryService for a national automobile dealership. Each branch of the dealership will build its own client application to consume InventoryService. Each branch connects to the main office of the dealership by using a virtual private network (VPN). All computers in the dealership run on Microsoft Windows operating systems. You need to ensure that callers of InventoryService are authenticated based on their Windows logon name and password. You configure Internet Information Services (IIS) according to your security needs. You need to configure the authentication type in the Web.config file. Which code segment should you use? A. <authentication mode=”Basic” /> B. <authentication mode=”Forms” /> C. <authentication mode=”Integrated” /> D. <authentication mode=”Windows” />
|
|
View Answer |
|
You create a serviced component named Tracker that uses attributes to dynamically register itself for COM+ services. Tracker is in an assembly file named XYZ.dll. Tracker uses transactions and role-based security. The roles and the application identity for Tracker are configured on the development computer. You are preparing to hand off Tracker to and administrator for deployment to production computers. You want all the COM+ configuration information for Tracker to be installed on the production computers. What should you do? A. Use the Component Services tool to export Tracker to an .msi file. Provide to the administrator the .msi file with instructions to run the installer. B. Provide to the administrator the XYZ.dll file. Instruct the administrator to copy XYZ.dll to all production computers and to install it in the global assembly cache. C. Provide to the administrator the XYZ.dll file. Instruct the administrator to use the .NET Services Installation tool (Regsvcs.exe) to install Tracker. D. Add a new merge module to your solution. Add XYZ.dll to the merge module. Provide to the administrator the .msm file with installation instructions.
|
|
View Answer |
|
You are creating an XML Web service that tracks employee information. The service contains a Web method named RetrieveXYZEmployees. The service also contains a base class named Employee and two classes named Manager and Engineer, which are derived from Employee. RetrieveXYZEmployees takes a roleID as input that specifies the type of employee to retrieve, either Manager or Engineer. RetrieveXYZEmployees returns an array type Employee that contains all employees that are in the specified role. You want to ensure that Manager and Engineer object types can be returned from RetrieveXYZEmployees. What should you do? A. Set the TypeName property of the XmlType attribute to Employee for both Manager and Engineer. B. Apply two XmlInclude attributes to RetrieveXYZEmployees, one of type Manager and one of type Engineer. C. Apply an XmlRoot attribute to the Employee class Apply an XmlAttribute attribute to the Manager and Engineer classes. D. Apply an XmlRoot attribute to the Employee class Apply an XmlElement attribute to the Manager and Engineer classes.
|
|
View Answer |
|
You have an ASP.NET application named XYZWebApp. This application uses a private assembly named Employee to store and retrieve employee data. Employee is located in the bin directory of XYZWebApp. You develop a new ASP .NET application named XYZWebApp2 that also needs to use employee. You assign Employee a strong name, set its version to 1.0.0.0, and install it in the global assembly cache. You then create a publisher policy assembly for version 1.0.0.0 and install it in the global assembly cache. You complete XYZWebApp2 against version 1.0.0.0. You do not recompile XYZWebApp. You then run MyWebApp. What is the most likely result? A. A VersionNotFoundException is Thrown. B. Employee is loaded from the bin directory. C. Version 1.0.0.0 of Employee is loaded from the global assembly cache. D. Version 1.0.0.0 of Employee is loaded by the publisher policy assembly.
|
|
View Answer |
|
You are creating an XML Web service named WeatherService that provides the current weather conditions for cities around the world. Your development cycle includes three stages: development, testing, and production. In each stage, WeatherService will be deployed on a different server. For testing, you create an ASP.NET application named WeatherTest. To WeatherTest, you add a Web reference to WeatherService. You then build a user interface and add the necessary code to test the service. The WeatherService interface will not change between testing and deployment. You want to ensure that you do not have to recompile WeatherTest every time WeatherService is moved from one server to another. What should you do? A. Each time WeatherService is moved, set the URL property of the generated proxy class to the new location. B. Each time WeatherService is moved, set the Web Reference URL property of the generated proxy class to the new location. C. Set the URLBehavior property of the generated proxy class to dynamic. Each time WeatherService is moved, update the appropriate key in the Web.config file to indicate the new location. D. Take the location of WeatherService as input to WeatherTest, and set the Proxy property of all proxy class instances to that location.
|
|
View Answer |
|
You are developing an ASP.NET application that consumes an XML Web service named AccountInformation. AccountInformation exposes a Web method named GetAccountBalance that expects encrypted user credentials to be passed in the SOAP header. AccountInformation also exposes a public class named AuthenticateUser. AuthenticateUser has two properties named Username and Password that are both defined as string.. In the application, you create two local variable named encryptedUsername and encryptedPassword that you will use to pass user credentials to GetAccountBalance. You need to write code that will execute the GetAccountBalance Web method. Which code segment should you use? A. Dim EXAccountInformation As New AccountInformation() Dim EXAuthenticateUser As New AuthenticateUser() EXAuthenticateUser.Username = encryptedUsername EXAuthenticateUser.Password = encryptedPassword EXAccountInformation.AuthenticateUserValue = _myAuthenticateUser Dim accountBalance As String accountBalance = myAccountInformation. GetAccountBalance() B. Dim EXAccountInformation As New AccountInformation() Dim EXAuthenticateUser As New AuthenticateUser() EXAuthenticateUser.Username = encryptedUsername EXAuthenticateUser.Password = encryptedPassword Dim accountBalance As String accountBalance = EXAccountInformation.GetAccountBalance() C. Dim EXAccountInformation As New AccountInformation() Dim EXAuthenticateUser As New AuthenticateUser() Dim Username As New SoapHeaderAttribute(“Username”) Username.MemberName = encryptedUserPassword Dim accountBalance As String accountBalance = EXAccountInformation.GetAccountBalance() D. Dim EXAccountInformation As New AccountInformation() Dim EXAuthenticateUser As New AuthenticateUser() EXAuthenticateUser.Username = encryptedUsername EXAuthenticateUser.Password = encryptedPassword Dim EXSoapHeaderCollection As New SoapHeaderCollection() EXSoapHeaderCollection.Add(myAuthenticateUser) Dim accountBalance As String accountBalance = EXAccountInformation.GetAccountBalance()
|
|
View Answer |