Welcome to TestSimulate

Pass Your Next Certification Exam Fast!

Everything you need to prepare, learn & pass your certification exam easily.

365 days free updates. First attempt guaranteed success.

Microsoft TS: Web Applications Development with Microsoft .NET Framework 4 (070-515) Free Practice Test

Question 1
You are developing an ASP.NET Web application.
The application is configured to use the membership and role providers.
You need to allow all users to perform an HTTP GET for application resources, but you must allow only the
user named Moderator to perform a POST operation.
Which configuration should you add to the web.config file?

Correct Answer: C
Question 2
You are developing an ASP.NET web application.
The application will contain a page that is customized for various browsers. The application will use output
caching to optimize performance.
You need to ensure that the page is cached by browser type and major version only.
Which attribute should you add to the OutputCache directive?

Correct Answer: D
Question 3
You are implementing a Web page that displays text that was typed by a user.
You need to display the user input in the Web page so that a cross-site scripting attack will be prevented.
What should you do?

Correct Answer: A
Question 4
You are implementing an ASP.NET Dynamic Data Web site.
The Web site includes a data context that enables automatic scaffolding for all tables in the data model.
The Global.asax.cs file contains the following code segment.
public static void RegisterRoutes(RouteCollection routes)
{ routes.Add(new DynamicDataRoute("{table}/ListDetails.aspx") {
Action = PageAction.List,
ViewName = "ListDetails",
Model = DefaultModel
});
routes.Add(new DynamicDataRoute("{table}/ListDetails.aspx")
{
Action = PageAction.Details,
ViewName = "ListDetails",
Model = DefaultModel
}); }
You need to display the items in a table named Products by using a custom layout. What should you do?

Correct Answer: C
Question 5
You are developing an ASP.NET Web page.
The page includes a List<Product> instance.
You add a FormView control to display a single Product from this list.
You need to bind the list to the FormView control.
Which FormView property should you set in the code-behind file?

Correct Answer: D
Question 6
You are developing an ASP.NET Web application.
Application data is stored in a Microsoft SQL Server 2008 database.
You configure a connection string named cnnContoso.
The application must cache the data that is returned from the database by using this connection string.
You need to ensure that the application checks the database every 10 seconds.
What should you do?

Correct Answer: C
Question 7
Which class defines the contract that ASP.NET implements to provide membership services using custom membership providers?

Correct Answer: D
Question 8
You create a Web page that contains the following code. (Line numbers are included for reference only.)
01 <script>
02 function changeColor(c) {
03 message.style.color = c;
04 }
05 </script>
07 <p id="message">Welcome!</p>
08 <ul id="color">
09 <li>Black</li>
10 <li>Red</li>
11 </ul>
You need to ensure that when the user clicks an item in the list, the text color of the "Welcome!" message
will change.
Which declaration should you use?

Correct Answer: D
Question 9
You are developing an ASP.NET web page.
The page must display data from XML file named Inventory.xml. Inventory.xml contains data in the following format.
<?xml version="1.0" standalone="yes"?> <inventory> <vehicle Make="BMW" Model="M3" Year="2005" Price="30000" instock="Yes"> <Ratings>....</Ratings>
</Vechicle> .... </Inventory>
You need to display Vehicle elements that have the inStock attribute set to YES.
Wich two controls should you add to the page? (Each control presents part of the solution.Choose two.)

Correct Answer: A,D
Question 10
You are developing an ASP.NET templated server control.
You need to ensure that a new ID namespace is created within the page control hierarchy when the control
is added to a page.
Which interface should you implement on the control?

Correct Answer: D