Microsoft 70-528 Real Exam Questions

TS: Microsoft .NET Framework 2.0 – Web-based Client Development

When the exam begins, you can choose the programming language in which the code segments will appear. The available code languages for this exam are:

  • Microsoft Visual Basic 2005

  • Microsoft Visual C# 2005

1: You create a Web application to process XML documents. The Web application receives XML document files from several sources, reads them, and stores them in a Microsoft SQL Server database. The Web application parses all incoming data files to ensure that they conform to an XML schema.  You need to find all validation errors in the XML document. What should you do?
A.Load the XML data by using an instance of the XmlDocument class and specify a location for the application schema.
B.Configure the ValidationEventHandler in the XmlReaderSettings of the XmlReader object.
C.Read the XML file into a DataSet object and set the EnforceConstraints property to True.
D.Read the XML file into a DataSet object. Handle the DataSet.MergeFailed event to parse the data that does not conform to the XML schema.
Correct Answers: B

2: Your Web site processes book orders. One of the application methods contains the following code segment.
XmlDocument doc = newXmlDocument();
doc.LoadXml("<book><discount>10</discount>" +"
<title>Dictionary</title></book>");
You need to remove the discount element from XmlDocument. Which two code segments can you use to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A.XmlNode root = doc.DocumentElement;root.RemoveChild(root.FirstChild);
B.XmlNode root = doc.DocumentElement;root.RemoveChild(root.SelectSingleNode("discount"));
C.doc.RemoveChild(doc.FirstChild);
D.doc.DocumentElement.RemoveChild(doc.FirstChild);
Correct Answers: A B

3: You are transferring records from one database to another.  You need to decide whether you can use the SqlBulkCopy class to transfer the records.  What should you do?
A.Ensure that the source database is Microsoft SQL Server.
B.Ensure that the destination database is Microsoft SQL Server.
C.Ensure that the column names in the source table match the column names in the destination table.
D.Ensure that the bulk copy program (bcp) utility is installed on the destination server.
Correct Answers: B

4: You create a Web Form that displays a GridView. The GridViews data source is a DataSet named dsOrders. The DataSet contains two DataTables named Orders and OrderDetails. You create a relation between the two DataTables using the following code segment. (Line numbers are included for reference only.)
01 dtOrders = dsOrders.Tables["Orders"];
02 dtOrderDetails = dsOrders.Tables["OrderDetails"];
03 colParent = dtOrders.Columns["OrderID"];
04 colChild = dtOrderDetails.Columns["ParentOrderID"];
05 dsOrders.Relations.Add("Rel1", colParent, colChild, false);
You need to find the cause of the exception being raised in line 05.
What should you do?
A.Ensure that the child column and the parent column have the same names.
B.Ensure that the child table and the parent table have the same names.
C.Ensure that the child column and the parent column have the same data types.
D.Ensure that each row in the child table has a corresponding row in the parent table.
E.Ensure that the tables have an explicit relationship defined by a foreign key constraint in the database.
Correct Answers: C

5: You are creating a Web application that will run on an intranet. The Web application reads comma-delimited text files. The text files reside in a subdirectory below the Web application’s root directory.  Users must not be able to navigate directly to these files in a Web browser unless they are members of the Accounting role.  You need to write an ASP.NET HTTP handler that will use the FileAuthorizationModule class. Which form of authentication should you use?
A.Anonymous
B.Certificate
C.Forms
D.Microsoft Windows Integrated Security
Correct Answers: D

6: You create a Web site that is for members only. The behavior of the Web site changes according to the role of the user. The Web site uses the ASP.NET Membership control for creation of user accounts. You need to find out whether a user is a member of a particular role. What should you do?
A.Pass the user names and passwords to Membership.ValidateUser.
B.Pass the role names to User.IsInRole.
C.Pass the role names to Roles.RoleExists.
D.Pass the user names to Membership.GetUser.
Correct Answers: B

7: You create a Web site. The Web site has many predefined roles and associated users that will be used for security purposes.  You need to manage these roles and user accounts. Which tool should you use?
A.the Microsoft .NET Framework Configuration tool
B.the Code Access Security Policy tool
C.the ASP.NET IIS Registration tool
D.the Web Site Administration Tool
Correct Answers: D

8: You are using the ASP.NET membership APIs to manage user accounts for a Web site. The Web.config file contains the definition for the membership provider.  After modifying the Web.config file to enable password recovery, you create a PasswordReset.aspx file.   You need to enable users to reset their passwords online. The new passwords must be sent to them by e-mail after they have logged on through the Login.aspx page. In addition, users must be required to answer their secret questions before resetting their passwords. Which code logic should you use?
A.Add a PasswordRecovery element to the PasswordReset.aspx file and configure it.
B.Modify the Page_Load to set the Membership.EnablePasswordReset to True in the PasswordReset.aspx file.
C.Add a ChangePassword element to the PasswordReset.aspx file and configure it.
D.Modify the Login.aspx form to include a Required Field validator on the secret question answer text box. Then redirect users to the PasswordReset.aspx file.
Correct Answers: A

9: You are developing a Web application. The Web application uses the following code segment to connect to a database.conn.ConnectionString = "Server=(local);Initial Catalog=NorthWind;Integrated Security=SSPI;";You create logins in Microsoft SQL Server for each user of the Web application. When you run the Web application, you receive the following error message. "Login failed for user ‘COMPUTERNAME\ASPNET’." You need to resolve this error. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A.In IIS, deny anonymous access.
B.In the Web.config file, enable impersonation.
C.In IIS, allow anonymous access.
D.In the Web.config file, disable impersonation.
E.In the Web.config file, set the authentication mode to Windows.
Correct Answers: A B

10: You develop a Web application. Your application contains two settings in the Web.config file. You deploy your application to production.  You need to modify the application settings in the production environment without manually editing the XML markup in the Web.config file.  What should you do?
A.Modify the application settings by using the Web Site Administration Tool.
B.Modify the application settings by using the Visual Studio property page editor for the project.
C.Modify the application settings by using the resource editor.
D.Modify the application settings by using the Visual Studio start options editor.
Correct Answers: A

Download  |  Password: certificatexam.com