|
Question |
Rating |
View Answer |
|
You develop an application named EXApp. This application needs to run on the same computer as a Windows service named EXService. You want to ensure that EXService starts from EXApp if EXService is not already running.. Which code segment should you use? A. Dim myServiceController As New _ ServiceController(“EXService”) If myServiceController.Status = _ ServiceControllerStatus.Stopped Then myServiceController.Start() End If B. Dim myServiceController As New _ ServiceController(“EXService”)myServiceController.Start() C. Dim myServiceController As New _ ServiceController() Dim myArgs(1)As String my Args(0)=”EXService” If myServiceController.Status = ServiceControllerStatus.Stopped Then myServiceController.Start(myArgs) End If D. Dim myServiceController As New _ ServiceController() Dim myArgs(1) As String my Args(0)= “EXService” myServiceController.Start(myArgs)
|
|
View Answer |
|
You are creating an XML Web service named XYZService. This service has a function named WriteMessage that writes messages to a flat file in the C:EXServiceLog directory.. You want to implement security for WriteMessage so that WriteMessage and all the code it calls can write messages only to the EXServiceLog directory. Which code segment should you use? A. Dim filePermission As New FileIOPermission_(FileIOPermissionAccess.Write, “C:EXServiceLog”) filePermission.Demand() B. Dim filePermission As New FileIOPermission_(FileIOPermissionAccess.Write, “C:EXServiceLog”) filePermission.Deny() C. Dim filePermission As New FileIOPermission_(FileIOPermissionAccess.Write, “C:EXServiceLog”) filePermission.PermitOnly() D. Dim filePermission As New FileIOPermission_(FileIOPermissionAccess.Write, “C:EXServiceLog”) filePermission.Assert()
|
|
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 |
|
You are creating a .NET Remoting object named BankOps. BankOps exposes methods for creating, finding, and modifying objects in a class named BankCustomer. BankCustomer has a large number of read/write properties.. You expect a large number of remote client applications to frequently connect to BankOps. You expect these remote client applications to use many of the BankCustomer properties. You want to ensure that network traffic is minimized. What should you do? A. Add the Serializable attribute to the BankCustomer class. B. Implement the IDisposable interface in the BankCustomer class. C. Derive the BankCustomer class from ContextBoundObject. D. Derive the BankCustomer class from MarshalByRefObject. Override the inherited InitializeLifetimeService method to return null.
|
|
View Answer |
|
You have a .NET Remoting object named ProductLoaderEX. The ProductLoaderEX class is a server-activated Singleton object. The ProductLoaderEX class loads product data into a Microsoft SQL Server database. The Load method of the ProductLoaderEX class is a time-consuming method to call. You are developing a client application that uses the ProductLoaderEX class. You want to ensure that the client application can continue to respond to user input while the Load method of the ProductLoaderEX class is called. What should you do? A. Use an AsyncDelegate instance to call the Load method. B. Modify the ProductLoaderEX class to be derived from IAsyncResult. C. Configure the ProductLoaderEX class to be a client-activated .NET Remoting object. D. Configure the client application to have its own remoting channel that matches the server’s channel and formatter.
|
|
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 |
|
ou are creating an XML Web service named ListBoxService. This service provides content, such as states, countries, and geographical regions, for use in drop-down list boxes. ListBoxService contains a Web method named RetrieveRegionsListBox. This method runs a DataSet object that contains every geographical region in the world. RetrieveRegionsListBox calls a Microsoft SQL Server database to load the DataSet object with region data. You want to minimize the amount of time the method takes to return to the caller. What should you do? A. Use a stored procedure to return the data. B. Store each DataSet object by using the Session object. C. Set the BufferResponse property of the WebMethod attribute to false. D. Set the CacheDuration property of the WebMethod attribute to an interval greater than zero.
|
|
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 |
|
XYZ Inc. provides a credit card processing application for its customers. The current application supports only computers that run on a Microsoft Windows operating system. You are asked to rewrite the current application as a .NET application. This .NET application does not need to be backward compatible with the current application. You must ensure that this new application meets the following requirements: • Must support asynchronous processing. • Must be able to pass data through firewalls. • Must pass only SOAP-Compliant formatted data validated by using an XSD schema. • Must not be limited to client computers running on a Microsoft operating system. You want to accomplish this task by using the minimum amount of development effort. Which type of .NET application should you use? A. Windows service B. XML Web service C. Serviced component D. .NET Remoting object
|
|
View Answer |
|
You are planning to create a DataSet object named EXDataSet to be used in a bond-trading application. Several developers will need to write code to manipulate EXDataSet, and you want to ensure that myDataSet is easy for them to use. You decide to create EXDataSet as a strongly typed data set. Which two actions should you take? (Each correct answer presents part of the solution. Choose two) A. Create an XSD schema that defines EXDataSet. B. Create an XDR schema that defines EXDataSet. C. Create a class for EXDataSet that is based on the schema and that inherits from the DataSet class. D. Create a class for EXDataSet that is based on the schema and that inherits from the XmlSchema class. E. Create a key pair for EXDataSet by using the Strong Name tool (Sn.exe).
|
|
View Answer |
|
You are developing an application to monitor store inventory. When inventory falls below a specified level, the application automatically generates a purchase request. Suppliers have requested that you transmit purchase requests to them in an XML document. Suppliers will accept the XML document in any valid form, except they do not want the data set definition to be included in the XML file. You create a method named GeneratePurchaseRequest. You write the code to populate a DataSet object named myDataSet with the purchase request data. You define a variable named fileName that contains the name and path of the output file. You need to create an XML file from the data in myDataSet by adding code to GeneratePurchaseRequest. You want to accomplish this task by writing the minimum amount of code. Which code segment should you use? A. myDataSet.WriteXML(fileName, XmlWriteMode.IgnoreSchema) B. myDataSet.WriteXML(fileName, XmlWriteMode.WriteSchema) C. myDataSet.WriteXMLSchema(filename) D. TextWriter myWriter = new StreamWriter(fileName) myDataSet.WriteXMLSchema(myWriter).
|
|
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 |
|
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 .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 a .NET Remoting object named PropertyCache. PropertyCache will hold a Hashtable object or name/value pairs. A variety of remote client applications will communicate with PropertyCache to set and get property values. You need to ensure that properties set by one client application are also accessible to other client applications. Which two actions should you take? (Each correct answer presents part of the solution. Choose two) A. Configure PropertyCache to be a client-activated object. B. Configure PropertyCache to be a server-activated Singleton object. C. Configure PropertyCache to be a server-activated SingleCall object. D. Derive the PropertyCache class from MarshalByRefObject and override InitializeLifetimeService() to return null. E. Mark the PropertyCache class with the Serializable attribute. Implement the ISponsor interface in the PropertyCache class. F. Implement the ISerializable and ILease interfaces in the PropertyCache class. Implement ILease.CurrentLeaseTime to return Int32.MaxValue.
|
|
View Answer |
|
You are creating an XML Web service that provides a daily quotation from literary works to its customers. This quotation is requested in many different languages, thousands of times every day, and by thousands of Web sites operating many different platform. A Web method named GetEXQuotes takes a languageID as input. GetEXQuotes uses this language ID to retrieve a translated version of the daily quotation from a Microsoft SQL Server database and to return that quotation to the customer. You want to minimize the time it takes to return the translated version. What should you do? A. Store each translated quotation by using the Cache object. B. Store each translated quotation by using the Session object. C. Set the BufferResponse property of the WebMethod attribute to false. D. Set the CacheDuration property of the WebMethod attribute to an interval greater than zero.
|
|
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 have a .NET Remoting object named XYZUtils. The XYZUtils class is a client-activated .NET Remoting object. You want to write a client application that creates and uses a XYZUtils object. You want the client application to hold onto a reference to a XYZUtils object for the duration of its execution. What should you do? A. Construct the XYZUtils object, and hold the object in a member variable. B. Construct the XYZUtils object, and set the LifeTimeService.LeaseTime to 0. C. In the client application, create an Implementation of the ISponsor interface. Implement the Renewal method to extend the lease. D. In the client application, create an Implementation of the ILease interface. Implement the CurrentLeaseTime property to return Int32.MaxValue.
|
|
View Answer |
|
You create two serviced components named OrderPipeline and OrderAdmin. Each component is registered in a separate COM+ server application. Both components use pricing data. OrderPipeline reads the pricing data for placing user orders. OrderAdmin modifies the pricing data. You want to ensure that OrderPipeline accesses the pricing data as quickly as possible, while still being able to immediately retrieve any pricing changes made by OrderAdmin. What should you do? A. Store the pricing data in the Shared Property Manager. B. Store the pricing data in Microsoft SQL Server database. C. Store the pricing data in a Hashtable object within OrderAdmin. Expose the Hashtable object through a property on OrderAdmin. D. Store the pricing data in an XmlDocument object within OrderAdmin. Expose the XmlDocument object through a property on OrderAdmin.
|
|
View Answer |
|
You create three Windows services named EXService1, EXService2, and EXService3. You want to install all three services on a computer named XYZA by using the Installer tool (Installutil.exe). On the command line of XYZA, you enter and run the following command: Installutil EXService1 EXService2 EXService3 During the installation process, EXService3 throws an installation error. The installation process completes. How many of the three services are now installed on XYZ1? A. None B. One C. Two D. Three.
|
|
View Answer |