PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which code fragment should you add on Line 07?

You are creating a Windows Forms application by using the .NET Framework 3.5. You write
the following code segment to update multiple databases on a SQL Server 2008 database.
(Line numbers are included for reference only.)
01 string connectionStringCustomer = @”Data Source=CUSTOMER;Integrated Security=
SSPI;”;
02 string connectionStringOrders = @”Data Source=ORDER ;Integrated Security= SSPI;”;
03 SqlCommand cmdCustomer = new SqlCommand();
04 SqlCommand cmdOrders = new SqlCommand();
05 SqlConnection cnnCustomer =
new SqlConnection(connectionStringCustomer);
06 SqlConnection cnnOrders = new SqlConnection(connectionStringOrders);
07
You need to ensure that all database updates are included in a single distributed transaction.
Which code fragment should you add on Line 07?

Which configuration setting should you insert at line 03?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The service contains the following binding configuration in the configuration file.
(Line numbers are included for reference only.)

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

You need to ensure that the following requirements are met:

The service must use transport-level security (SSL via HTTPS). The service must use message-level security to authenticate client applications by using user name and password. Which configuration setting 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.
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. To this end you created the following Web method:

<WebMethod()>
public void VerifyLicence(string licenseNumber)
{}

You need to apply an attribute to the method to specify the parameter style and formatting that is expected from SOAP clients. You should take care that the XML Web Service that you are developing is Web Services Interoperability (WS-1) compliant.

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

What should you do?

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

You attach Microsoft Visual Studio 2008 debugger to the Microsoft Internet Explorer instance to debug the JavaScript code in the AJAX application.
You need to ensure that the application displays the details of the client-side object on the debugger console.

What should you do?

Which code segment should you insert at line 04?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.You create a Web form and add the following code fragment.
<asp:Repeater ID=”rptData” runat=”server”
DataSourceID=”SqlDataSource1″ ItemDataBound=”rptData_ItemDataBound”>
<ItemTemplate>
<asp:Label ID=”lblQuantity” runat=”server” Text='<%# Eval(“QuantityOnHand”) %>’ />
</ItemTemplate>
</asp:Repeater>
The SqlDataSource1 DataSource control retrieves the Quantity column values from a table
named Products.You write the following code segment to create the
rptData_ItemDataBound event handler. (Line numbers are included for reference only.)
01 protected void rptData_ItemDataBound(object sender,
02 RepeaterItemEventArgs e)
03 {
04
05 if(lbl != null)
06 if(int.Parse(lbl.Text) < 10)
07 lbl.ForeColor = Color.Red;
08 }
You need to retrieve a reference to the lblQuantity Label control into a variable named lbl.
Which code segment should you insert at line 04?

Which code fragment should you insert at line 05?

You are creating a client application by using Microsoft .NET Framework 3.5. You use Windows Communication Foundation (WCF) to create the application. The client application uses a Personal Information Card to provide authentication information to the WCF server. You write the following code fragment. (Line numbers are included for reference only.)

01 <wsFederationHttpBinding>
02 <binding name=”requireCardSpace”>
03 <security mode=”Message”>
04 <message >
06 </message>
07 </security>
08 </binding>
09 </wsFederationHttpBinding>

You need to ensure that one of the claims in the Personal Information Card contains an e-mail address. Which code fragment 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 configuration and customization of Web Service applications forms part of your responsibilities at Domain.com.
The following exhibit illustrates the class definition that currently exists for a Web Service.

WebService(), SoapRpcService()>
public class LicenseService : WebService
<WebMethod(), SoapRpcMethodAttribute()> public numeral ObtainPoints(string licenceNumber)
{
return 0;
}
<WebMethod(),SoapRpcMethodAttribute(string state, string licenseNumber)> void ValidateLicense()
{
}
}

You received instruction to apply the WebServiceBinding attribute to support the Web Service.

What should you do?

Which section should you add to the Web.config file?

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

The application contains two HTML pages named ErrorPage.htm and PageNotFound.htm.

You need to ensure that the following requirements are met:

When the user requests a page that does not exist, the PageNotFound.htm page is displayed.
When any other error occurs, the ErrorPage.htm page is displayed.

Which section should you add to the Web.config file?