PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which code segment should you add at line 03?

You are creating a Windows application for a financial services provider by using the .NET
Framework 3.5.You write the following code segment in the form. (Line numbers are
included for reference only.)
01 string queryString =
02 “SELECT CategoryID, CategoryName FROM Categories”;
03
The connection string for the financial services database is stored in the variable named
connString.You need to ensure that the form populates a DataGridView control named
gridCAT. Which code segment should you add at line 03?

Which code segment should you use?

You have created a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The existing service interface is named IMyService, and contains the following code segment.

[ServiceContract(Name=”SvcOrder”,
Namespace=”http://contoso.com/services”)]
public interface IMyService
{
[OperationContract]
void DoSomething();
}

You create a new service named IMyServiceV1 that contains an operation named DoSomethingElse. You need to ensure that existing client applications are still able to access the

IMyService.DoSomething
method without modifying client code.

Which code segment should you use?

What should you do?

You work as the Microsoft.NET developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003.
The development and deployment of Microsoft.NET Remoting components forms part of your responsibilities at Domain.com. You are currently developing a Microsoft.NET Remoting component that will be accessed over the Domain.com local area network (LAN). To this end you create a console application named RemoteHost.exe to serve remote calls to the component. You added Remoting configuration settings in the app.config file of the console application’s project. Now you need to configure the host application to use those configuration settings that has been added in the app.config file.

What should you do? (Choose the appropriate code segment.)

What additional step should you perform?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.

You use Windows Authentication for the application.
You set up NTFS file system permissions for the Sales group to access a particular file.
You discover that all the users are able to access the file.
You need to ensure that only the Sales group users can access the file.

What additional step should you perform?

segment should you insert at line 05?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft
ADO.NET.The application contains a DataSet object named OrderDS that has the Order and
OrderDetail tables as shown in the following exhibit.

You write the following code segment. (Line numbers are included for reference only.)
01 private void GetOrders(SqlDataConnection cn) {
02 SqlCommand cmd = cn.CreateCommand();
03 cmd.CommandText = “Select * from [Order];
Select * from [OrderDetail];”;
04 SqlDataAdapter da = new SqlDataAdapter(cmd);
05
06 }
You need to ensure that the Order and the OrderDetail tables are populated. Which code
segment should you insert at line 05?

What should you do?

You work as the Microsoft.NET developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003.
The development of applications forms part of your responsibilities at Domain.com. You are currently developing an application that monitors a network for changes. The application itself consists of a Microsoft ASP.NET Web application and a Microsoft .NET Remoting server component. Both of these exist on the same server but run in different processes. Policies and rules for monitoring the network are stored in a Microsoft SQL Server 2005 database. The server component contains a class named Monitor. This class contains a method named GetChanges that returns a DataSet instance. Changes to the network are represented by DataSet. When initiated the Monitor class will retrieve all policies and rules from the database. You need to code the host application for the remote component to register the Monitor class for .NET Remoting. However, you do not want the remote component to query the database each time the GetChanges method is called. This means that you should configure a certain code segment.

What should you do? (Choose the correct code segment.)

What should you do?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.

The computer that hosts the ASP.NET Web application contains a local instance of Microsoft SQL Server 2005.
The instance uses Windows Authentication.
You plan to configure the membership providers and the role management providers.
You need to install the database elements for both the providers on the local computer.
What should you do?