Microsoft TS: Web Applications Development with Microsoft .NET Framework 4 (70-515) Free Practice Test
Question 1
You are implementing an ASP.NET MVC 2 Web application.
The URL with path /Home/Details/{country} will return a page that provides information about the named
country.
You need to ensure that requests for this URL that contain an unrecognized country value will not be
processed by the Details action of HomeController.
What should you do?
The URL with path /Home/Details/{country} will return a page that provides information about the named
country.
You need to ensure that requests for this URL that contain an unrecognized country value will not be
processed by the Details action of HomeController.
What should you do?
Correct Answer: C
Question 2
You are developing an ASP.NET MVC 2 application.
You create a view that will be returned by action methods in multiple controllers.
You need to place the view in the appropriate folder.
To which subfolder within the Views folder should you add the view?
You create a view that will be returned by action methods in multiple controllers.
You need to place the view in the appropriate folder.
To which subfolder within the Views folder should you add the view?
Correct Answer: A
Question 3
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?
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 4
You are developing an ASP.NET web application. Your designer creates a theme named General for
general use in the application.
The designer also makes page-specific changes to the default properties of certain controls.
You need to apply the General theme to all pages, and you must ensure that the page-specific
customizations are preserved.
What should you do?
general use in the application.
The designer also makes page-specific changes to the default properties of certain controls.
You need to apply the General theme to all pages, and you must ensure that the page-specific
customizations are preserved.
What should you do?
Correct Answer: B
Question 5
You work as an ASP.NET Web Application Developer for SomeCompany.
The company uses Visual Studio .NET 2010 as its application development platform.
You create an ASP.NET Web application using .NET Framework 4.0.
The ASP.NET application is used to track employee performance.
It uses Microsoft Windows authentication.
Employees are members of a group named Employees.
Managers are members of a group named Managers.
The root folder of the application is named Details.
The Details folder displays information about employees' performance.
The Details folder has a subfolder named MoreDetails.
You need to ensure that employees and managers can access pages stored in the Details folder.
However, only managers can access pages stored in the MoreDetails folder.
You make the following entries in the Web.config file in the Details folder.
(Line numbers are given for reference only.)
1 <authentication mode="Windows" / >
2 <authorization>
3 <allow roles="Employees, Managers" / >
4 <deny users="*" />
5 </authorization>
You make the following entries in the Web.config file in the MoreDetails folder.
(Line numbers are given for reference only.)
1 <authentication="Windows" />
2 <authorization>
3 <allow roles="Managers" />
4 <deny users="*" />
5 </authorization>
When managers try to access pages stored in the MoreDetails folder, they receive the following error message:
"An error occurred during the processing of a configuration file required to service this request."
You must ensure that managers are able to access pages stored in the MoreDetails folder. What will you do to accomplish this?
The company uses Visual Studio .NET 2010 as its application development platform.
You create an ASP.NET Web application using .NET Framework 4.0.
The ASP.NET application is used to track employee performance.
It uses Microsoft Windows authentication.
Employees are members of a group named Employees.
Managers are members of a group named Managers.
The root folder of the application is named Details.
The Details folder displays information about employees' performance.
The Details folder has a subfolder named MoreDetails.
You need to ensure that employees and managers can access pages stored in the Details folder.
However, only managers can access pages stored in the MoreDetails folder.
You make the following entries in the Web.config file in the Details folder.
(Line numbers are given for reference only.)
1 <authentication mode="Windows" / >
2 <authorization>
3 <allow roles="Employees, Managers" / >
4 <deny users="*" />
5 </authorization>
You make the following entries in the Web.config file in the MoreDetails folder.
(Line numbers are given for reference only.)
1 <authentication="Windows" />
2 <authorization>
3 <allow roles="Managers" />
4 <deny users="*" />
5 </authorization>
When managers try to access pages stored in the MoreDetails folder, they receive the following error message:
"An error occurred during the processing of a configuration file required to service this request."
You must ensure that managers are able to access pages stored in the MoreDetails folder. What will you do to accomplish this?
Correct Answer: C
Question 6
You are implementing a new Dynamic Data Web site.
The Web site includes a Web page that has an ObjectDataSource control named ObjectDataSource1.
ObjectDataSource1 interacts with a Web service that exposes methods for listing and editing instances of a
class named Product.
You add a GridView control named GridView1 to the page, and you specify that GridView1 should use
ObjectDataSource1 as its data source.
You then configure GridView1 to auto-generate fields and to enable editing.
You need to add Dynamic Data behavior to GridView1.
You also must ensure that users can use GridView1 to update Product instances.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
The Web site includes a Web page that has an ObjectDataSource control named ObjectDataSource1.
ObjectDataSource1 interacts with a Web service that exposes methods for listing and editing instances of a
class named Product.
You add a GridView control named GridView1 to the page, and you specify that GridView1 should use
ObjectDataSource1 as its data source.
You then configure GridView1 to auto-generate fields and to enable editing.
You need to add Dynamic Data behavior to GridView1.
You also must ensure that users can use GridView1 to update Product instances.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Correct Answer: A,C
Question 7
You are developing an ASP.NET web application that you will deploy to an Internet Information Services
(IIS) 7.0 server.
The application will run in Integrated pipeline mode. The application contains a phot gallery of images that
are stored in a Microsoft SQL Server database.
You need to ensure that the application can retrieve images from the database without blocking IIS worker
process threads.
What should you do?
(IIS) 7.0 server.
The application will run in Integrated pipeline mode. The application contains a phot gallery of images that
are stored in a Microsoft SQL Server database.
You need to ensure that the application can retrieve images from the database without blocking IIS worker
process threads.
What should you do?
Correct Answer: B
Question 8
You are developing an ASP.NET MVC2 view and controller.
The application includes a class names Employee that has a LastName property. The controller requires an
action method that will insert an Employee
instance into a database.
You need to ensure that the data that is submitted is an Employee instance and that a LastName value is
given.
What should you do?
The application includes a class names Employee that has a LastName property. The controller requires an
action method that will insert an Employee
instance into a database.
You need to ensure that the data that is submitted is an Employee instance and that a LastName value is
given.
What should you do?
Correct Answer: D
Question 9
You are implementing an ASP.NET web application.The application defines the following classes. public class Person {
public String Name{get; set;} publicIList<Address> Addresses{get;set;} }
public class Address
{ public String AddressType{get; set;} public string AddressValue{get;set;}
}
The applicaction must generate XML from personList, wich is a collection of Person instances.The following
XML is an example of the schema than the generated XML must use.
<Persons>
<Person Name="John Doe">
<Address Email="[email protected]"/>
<Address AlternativeEmail="[email protected]"/>
<Address MSNInstanceMessenger="[email protected]"/>
</Person>
.....
</Persons>
You need to generate the XML.
Wich code segment should you use?
public String Name{get; set;} publicIList<Address> Addresses{get;set;} }
public class Address
{ public String AddressType{get; set;} public string AddressValue{get;set;}
}
The applicaction must generate XML from personList, wich is a collection of Person instances.The following
XML is an example of the schema than the generated XML must use.
<Persons>
<Person Name="John Doe">
<Address Email="[email protected]"/>
<Address AlternativeEmail="[email protected]"/>
<Address MSNInstanceMessenger="[email protected]"/>
</Person>
.....
</Persons>
You need to generate the XML.
Wich code segment should you use?
Correct Answer: A
Question 10
Which tool is used to simplify the migration, management and deployment of IIS Web servers, Web applications and Web sites?
Correct Answer: C