Microsoft TS: Microsoft .NET Framework 2.0 - Web-based Client Development - 70-528 Exam Practice Test
You create a Web site to use a Microsoft ASP.NET membership provider.
The Web.config file contains the following code fragment.
<membership defaultProvider="AppProvider">
<providers>
<clear />
<add name="AppProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="AppConnectionString"
applicationName="App"
requiresUniqueEmail="true"
enablePasswordRetrieval="true"
requiresQuestionAndAnswer="true"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10"/>
</providers>
</membership>
You need to ensure that the following requirements are met:
Passwords are stored securely. Users can recover their passwords.
Which attribute should you add to the membership provider configuration?
The Web.config file contains the following code fragment.
<membership defaultProvider="AppProvider">
<providers>
<clear />
<add name="AppProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="AppConnectionString"
applicationName="App"
requiresUniqueEmail="true"
enablePasswordRetrieval="true"
requiresQuestionAndAnswer="true"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10"/>
</providers>
</membership>
You need to ensure that the following requirements are met:
Passwords are stored securely. Users can recover their passwords.
Which attribute should you add to the membership provider configuration?
Correct Answer: B
Vote an answer
You write a class to interact with a database. The class uses a SqlConnection instance.
You need to detect when the state of the connection has been modified.
What should you do?
You need to detect when the state of the connection has been modified.
What should you do?
Correct Answer: C
Vote an answer
You create a Web Form. The Web Form uses the FormView control to enable a user to edit a record in the
database.
When the user clicks the Update button on the FormView control, the application must validate that the
user has entered data in all of the fields.
You need to ensure that the Web Form does not update if the user has not entered data in all of the fields.
Which code segment should you use?
database.
When the user clicks the Update button on the FormView control, the application must validate that the
user has entered data in all of the fields.
You need to ensure that the Web Form does not update if the user has not entered data in all of the fields.
Which code segment should you use?
Correct Answer: H
Vote an answer
You create a Web Form that contains a TreeView control. The TreeView control allows users to navigate
within the Marketing section of your Web site.
The following XML defines the site map for your site.
<siteMapNode url="~/default.aspx" title="Home" description="Site Home Page">
<siteMapNode url="Sales.aspx" title="Sales" description="Sales Home">
<siteMapNode url="SalesWest.aspx" title="West Region" description="Sales for
the West Region" />
<siteMapNode url="SalesEast.aspx" title="East Region" description="Sales for
the East Region" />
</siteMapNode>
<siteMapNode url="Marketing.aspx" title="Marketing" description="Marketing
Home">
<siteMapNode url="MarketNational.aspx" title="National Campaign"
description="National marketing campaign" />
<siteMapNode url="MarketMidwest.aspx" title="Midwest Campaign"
description="Midwest region marketing campaign" />
<siteMapNode url="MarketSouth.aspx" title="South Campaign" description="South
region marketing campaign" />
</siteMapNode>
</siteMapNode>
You need to bind the TreeView control to the site map data so that users can navigate only within the Marketing section.
Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)
within the Marketing section of your Web site.
The following XML defines the site map for your site.
<siteMapNode url="~/default.aspx" title="Home" description="Site Home Page">
<siteMapNode url="Sales.aspx" title="Sales" description="Sales Home">
<siteMapNode url="SalesWest.aspx" title="West Region" description="Sales for
the West Region" />
<siteMapNode url="SalesEast.aspx" title="East Region" description="Sales for
the East Region" />
</siteMapNode>
<siteMapNode url="Marketing.aspx" title="Marketing" description="Marketing
Home">
<siteMapNode url="MarketNational.aspx" title="National Campaign"
description="National marketing campaign" />
<siteMapNode url="MarketMidwest.aspx" title="Midwest Campaign"
description="Midwest region marketing campaign" />
<siteMapNode url="MarketSouth.aspx" title="South Campaign" description="South
region marketing campaign" />
</siteMapNode>
</siteMapNode>
You need to bind the TreeView control to the site map data so that users can navigate only within the Marketing section.
Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)
Correct Answer: A,D,F
Vote an answer
You are developing a custom Web control named MyControl that inherits from the
System.Web.UI.WebControls.WebControl class.
When MyControl is added to a Microsoft ASP.NET Web Form from the Microsoft Visual Studio Toolbox,
the following markup is added.
<cc1:MyControl ID="MyControl1" runat="server"></cc1:MyControl>
You need to ensure that the following markup is added instead.
<awc:MyControl ID="MyControl1" runat="server"></awc:MyControl>
What should you do?
System.Web.UI.WebControls.WebControl class.
When MyControl is added to a Microsoft ASP.NET Web Form from the Microsoft Visual Studio Toolbox,
the following markup is added.
<cc1:MyControl ID="MyControl1" runat="server"></cc1:MyControl>
You need to ensure that the following markup is added instead.
<awc:MyControl ID="MyControl1" runat="server"></awc:MyControl>
What should you do?
Correct Answer: A
Vote an answer
You are developing a Microsoft ASP.NET application that connects to a Microsoft SQL Server database.
The application will be deployed by using file transfer protocol (FTP).
You need to ensure that the database connection string meets the following requirements:
It must be stored in a secure location.
It can be modified at the time of deployment.
It can be modified without changing the source code.
Where should you store the connection string?
The application will be deployed by using file transfer protocol (FTP).
You need to ensure that the database connection string meets the following requirements:
It must be stored in a secure location.
It can be modified at the time of deployment.
It can be modified without changing the source code.
Where should you store the connection string?
Correct Answer: D
Vote an answer