70-515試験無料問題集「Microsoft TS: Web Applications Development with Microsoft .NET Framework 4 認定」
You are adding new capabilities to an ASP.NET web site. The site currently connects to a Microsoft SQL Server database by using the credentials of the CONTOSO\AppIdentity account, which has been granted access to only objects within the database.
The application requires the following implementation:
Database objects that support ASP.NET roles must be added to the existing database.
The Contoso\AppIdentity user must be granted only the minimum privileges that are required to support all features of ASP.NET roles.
You need to add the ASP.NET roles support.
Which two actions should you perform? (Each correct answer presents part of the complete solution. Choose two.)
The application requires the following implementation:
Database objects that support ASP.NET roles must be added to the existing database.
The Contoso\AppIdentity user must be granted only the minimum privileges that are required to support all features of ASP.NET roles.
You need to add the ASP.NET roles support.
Which two actions should you perform? (Each correct answer presents part of the complete solution. Choose two.)
正解:A,B
解答を投票する
You create a Web page that contains drop-down menus that are defined by using div tags in the following code.
<div class="dropdown-menu"> <div class="menu-title">Menu One</div> <div class="menu-items" style="display:none;">
<div><a href="#">Item One</a></div>
<div><a href="#">Item Two</a></div>
</div> </div> <div class="dropdown-menu">
<div class="menu-title">Menu Two</div>
<div class="menu-items" style="display:none;">
<div><a href="#">Item Three</a></div>
<div><a href="#">Item Four</a></div>
</div> </div>
You need to write a JavaScript function that will enable the drop-down menus to activate when the user
positions the mouse over the menu title.
Which code segment should you use?
<div class="dropdown-menu"> <div class="menu-title">Menu One</div> <div class="menu-items" style="display:none;">
<div><a href="#">Item One</a></div>
<div><a href="#">Item Two</a></div>
</div> </div> <div class="dropdown-menu">
<div class="menu-title">Menu Two</div>
<div class="menu-items" style="display:none;">
<div><a href="#">Item Three</a></div>
<div><a href="#">Item Four</a></div>
</div> </div>
You need to write a JavaScript function that will enable the drop-down menus to activate when the user
positions the mouse over the menu title.
Which code segment should you use?
正解:D
解答を投票する
You are implementing an ASP.NET Web application that retrieves data from a Microsoft SQL Server
database.
You add a page that includes the following data source control.
<asp:SqlDataSource id="sqlds" runat="server" ConnectionString="<%$ ConnectionStrings:MyDB %>" SelectCommand="SELECT * FROM Companies" />
The page is accessed frequently, but the data in the database rarely changes.
You need to cache the retrieved data so that the database is not queried each time the Web page is
accessed.
What should you do?
database.
You add a page that includes the following data source control.
<asp:SqlDataSource id="sqlds" runat="server" ConnectionString="<%$ ConnectionStrings:MyDB %>" SelectCommand="SELECT * FROM Companies" />
The page is accessed frequently, but the data in the database rarely changes.
You need to cache the retrieved data so that the database is not queried each time the Web page is
accessed.
What should you do?
正解:B
解答を投票する
You are debugging an ASP.NET web page. The page includes the following method:
[WebMethod]
public string GetServerString()
{
...
}
The page also includes the following markup:
<asp:ScriptManager ID="sm1" runat="server" />
The following JavaScript code is used to call the GetServerString method:
function GetString() { PageMethods.GetServerString(callbackMethod); }
function callbackMethod(str) {
...
}
The AJAX calls to the GetServerString method are failing.
You need to ensure that the AJAX call to the GetServerString method succeeds.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
[WebMethod]
public string GetServerString()
{
...
}
The page also includes the following markup:
<asp:ScriptManager ID="sm1" runat="server" />
The following JavaScript code is used to call the GetServerString method:
function GetString() { PageMethods.GetServerString(callbackMethod); }
function callbackMethod(str) {
...
}
The AJAX calls to the GetServerString method are failing.
You need to ensure that the AJAX call to the GetServerString method succeeds.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
正解:A,B
解答を投票する
You are developing an ASP.NET MVC 2 application.
A view contains a form that allows users to submit their first name.
You need to display the value that is submitted, and you must ensure that your code avoids cross-site
scripting.
Which code segment should you use?
A view contains a form that allows users to submit their first name.
You need to display the value that is submitted, and you must ensure that your code avoids cross-site
scripting.
Which code segment should you use?
正解:A
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
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?
正解:B
解答を投票する
You are implementing an ASP.NET Web application.
Users will authenticate to the application with an ID.
The application will allow new users to register for an account.
The application will generate an ID for the user based on the user's full name.
You need to implement this registration functionality.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Users will authenticate to the application with an ID.
The application will allow new users to register for an account.
The application will generate an ID for the user based on the user's full name.
You need to implement this registration functionality.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
正解:B,D
解答を投票する
You are implementing an ASP.NET application that uses LINQ to Entities to access and update the
database.
The application includes the following method to update a detached entity of type Person.
private NorthwindContext _entities;
public void UpdatePerson(Person personToEdit) { }
You need to implement the UpdatePerson method to update the database row that corresponds to the
personToEdit object.
Which code segment should you use?
database.
The application includes the following method to update a detached entity of type Person.
private NorthwindContext _entities;
public void UpdatePerson(Person personToEdit) { }
You need to implement the UpdatePerson method to update the database row that corresponds to the
personToEdit object.
Which code segment should you use?
正解:B
解答を投票する
You are implementing an ASP.NET page.
Client-side script requires data.
Your application includes a class named Person with a Name property of type string.
The code-behind file of the page includes the following code segment.
public string JsonValue;
List<Person> people = GetPeopleList();
JavaScriptSerializer json = new JavaScriptSerializer();
You need to use the JavaScriptSerializer class to serialize only the Name property of each item in the
people list.
Which code segment should you use?
Client-side script requires data.
Your application includes a class named Person with a Name property of type string.
The code-behind file of the page includes the following code segment.
public string JsonValue;
List<Person> people = GetPeopleList();
JavaScriptSerializer json = new JavaScriptSerializer();
You need to use the JavaScriptSerializer class to serialize only the Name property of each item in the
people list.
Which code segment should you use?
正解:A
解答を投票する