PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which code segment should you insert at line 03?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft
ADO.NET.The application contains a DataSet object named orderDS. The object contains a
table named Order as shown in the following exhibit.
The application uses a SqlDataAdapter object named daOrder to populate the Order table.
You write the following code segment. (Line numbers are included for reference only.)
01 private void FillOrderTable(int pageIndex) {
02 int pageSize = 5;
03
04 }
You need to fill the Order table with the next set of 5 records for each increase in the
pageIndex value.Which code segment should you insert at line 03?

Which configuration settings should you use?

You are creating a distributed client application by using Microsoft .NET Framework 3.5. You use Windows Communication Foundation (WCF) to create the application. You specify the following configuration settings for the service application.

<serviceCredentials>
<userNameAuthentication
userNamePasswordValidationMode=”MembershipProvider” membershipProviderName=”SqlMembershipProvider”/>
</serviceCredentials>

You need to authenticate the client application by using the Microsoft ASP.NET membership provider. Which configuration settings 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 configuration and customization of Web Service applications forms part of your responsibilities at Domain.com.
You are currently busy developing an Extensible Markup Language (XML) Web service. This XML Web service is intended to allow the traffic department to perform driver license verifications. The traffic department will send a SOAP request similar to the one illustrated in the exhibit.
<soap:envelope>
<soap:body>
<state xmlns=”urn:gov:DOT”>GA</state>
<licenseNumber xmlns+”urn:gov:DOT”>111222333</LicenseNumber> </soap:body>
<soap:envelope>

You have created a Web method named VerifyLicense. And now you need to apply an attribute to the VerifyLicence method to enable it to support the SOAP requests which will be sent to it.
What should you do? (Choose the correct code segment.)

Which code segment should you use?

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

You create a custom control named OrderForm.

You write the following code segment.

public delegate void CheckOrderFormEventHandler(EventArgs e);
private static readonly object CheckOrderFormKey = new object();
public event CheckOrderFormEventHandler CheckOrderForm {
add {
Events.AddHandler(CheckOrderFormKey, value);
}
remove {
Events.RemoveHandler(CheckOrderFormKey,
value);
}
}

You need to provide a method that enables the OrderForm control to raise the CheckOrderForm event.

Which code segment should you use?

Which code fragment should you insert at line 03?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You write the following code fragment for the configuration setting. (Line numbers are included for reference only.)

01 <wsHttpBinding>
02 <binding name=”simple”>
04 </binding>
05 </wsHttpBinding>

You need to ensure that the service uses transport security and allows access to anonymous client applications. Which code fragment should you insert at line 03?

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 configuration and customization of Web Service applications forms part of your responsibilities at Domain.com. Domain.com operates as a taxi-cab-for-hire company. You are currently developing an Extensible Markup Language (XML) Web Service that is meant to allow Domain.com to be able to locate the taxis that it provides for its customers. With this Web service application the Domain.com Web service clients will send a SOAP request silimar to the one that is illustrated in the exhibit.

<soap:envelope>
<soap:body>
<ObtainLocation xmlns=”urn:gov:DOT”>
<mobilePhoneNumber>000-000-0000</mobilePhoneNumber> </ObtainLocation>
</soap:body>
<soap:envelope>

You have created a Web method named ObtainLocation. You then apply a SoapDocumentMethod attribute to ObtainLocation. Now you need to configure the SoapDocumentMethod attribute so as to enable it to support the SOAP request.

What should you do? (Each correct answer presents part of the solution. Choose two.)

<?xml version="1.0" encoding="utf-8" ?

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

You add an XmlDataSource control named XmlDataSource1 to the Web page. XmlDataSource1 is bound to an XML document with the following structure.

<?xml version=”1.0″ encoding=”utf-8″ ?>
<clients>
<client ID=”1″ Name=”John Evans” />
<client ID=”2″ Name=”Mike Miller”/>

</clients>

You also write the following code segment in the code-behind file of the Web page.

protected void BulletedList1_Click(
object sender, BulletedListEventArgs e) {
//…
}

You need to add a BulletedList control named BulletedList1 to the Web page that is bound
to XmlDataSource1.

Which code fragment should you use?