Apr 2016 updated: Pass4sure Microsoft 70-515 exam question 16-30

70-515 Royal Pack Testengine pdf

100% Actual & Verified — 100% PASS

Unlimited access to the world's largest Dumps library! Try it Free Today!

Get it now →

Product Description:
Exam Number/Code: 70-515
Exam name: TS: Web Applications Development with Microsoft .NET Framework 4
n questions with full explanations
Certification: Microsoft Certification
Last updated on Global synchronizing

Free Certification Real IT 70-515 Exam pdf Collection

Approved of 70-515 exam cost materials and faq for Microsoft certification for IT learners, Real Success Guaranteed with Updated 70-515 pdf dumps vce Materials. 100% PASS TS: Web Applications Development with Microsoft .NET Framework 4 exam Today!

2016 Apr 70-515 Study Guide Questions:

Q16. You are developing an ASP.NET Web page. 

The page uses the MicrosoftAjax.js script file and the MicrosoftAjaxWebForms.js script file. 

You need to ensure that both scripts are combined into a single script. 

Which markup should you use? 


A. <asp:ScriptManager ID="sm1" runat="server"> 

<CompositeScript> 

<Scripts> 

<asp:ScriptReference Name="MicrosoftAjax.js" /> 

<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" /> 

</Scripts> 

</CompositeScript> 

</asp:ScriptManager> 


B. <asp:ScriptManager ID="sm1" runat="server"> 

<CompositeScript ScriptMode="Auto"> 

<Scripts> 

<asp:ScriptReference Name="MicrosoftAjax.js" /> 

<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" /> 

</Scripts> 

</CompositeScript> 

</asp:ScriptManager> 


C. <asp:ScriptManager ID="sm1" runat="server"> 

<CompositeScript ScriptMode="Release"> 

<Scripts> 

<asp:ScriptReference Name="MicrosoftAjax.js" /> 

<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" /> 

</Scripts> 

</CompositeScript> 

</asp:ScriptManager> 


D. <asp:ScriptManager ID="sm1" runat="server"> 

<Scripts> 

<asp:ScriptReference Name="MicrosoftAjax.js" /> 

<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" /> 

</Scripts> 

</asp:ScriptManager> 


Answer: A 


Q17. You are creating an ASP.NET Web application that uses the SqlMembershipProvider. You plan to test locally and deploy to multiple production servers. You need to ensure that each deployed application accesses the same production database in Microsoft SQL Server. 

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Run the aspnet_regsql command to create the database on the appropriate SQL Server computer. 

B. Right-click App_Data in your Visual Studio 2010 project, click Add, and select New Item to create the SQL Server database on the appropriate SQL Server computer. 

C. Modify the connection string in the web.config file to specify the names of the production server and database. 

D. Modify the web.release.config file to transform the connection string to specify the names of the production server and database. 

Answer: AD 


Q18. RAG DROP 

You have an ASP.NET web application that uses master pages and content pages. 

You must initialize and close multiple resources from different events. 

In what order do events in the master pages and content pages occur? 


Answer: 


Q19. 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="John.Doe@contoso.com"/> 

<Address AlternativeEmail="John.Doe@contoso.com"/> 


<Address MSNInstanceMessenger="John.Doe@contoso.com"/> 

</Person> 

..... 

</Persons> 

You need to generate the XML. 

Wich code segment should you use? 

A. var XML= new XElement("Persons", 

from person in personList 

Select (new XElement("Persons", 

newXElement("Name", person.Name), 

from addr in person.Addresses 

select new XElement("Address", 

newXElement(addr.AddressType, 

addr.AddressValue))))); 


B. var XML= new XAttribute("Persons", 

from person in personList 

Select (new XElement("Persons", 

newXAttribute("Name", person.Name), 

from addr in person.Addresses 

select new XAttribute("Address", 

newXAttribute(addr.AddressType, 

addr.AddressValue))))); 


C. var XML= new XElement("Persons", 

from person in personList 

Select (new XElement("Persons", 

newXAttribute("Name", person.Name)))); 


D. var XML= new XElement("Persons", 

from person in personList 

Select (new XElement("Person", 

newXAttribute("Name", person.Name), 

from addr in person.Addresses 

select new XElement("Address", 

newXAttribute(addr.AddressType, 

addr.AddressValue))))); 


Answer: D 


Q20. You create a page in an ASP.NET Web application. The page retrieves and displays data from a Microsoft SQL Server database. You need to create a data source that can connect 

to the database. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.) 

A. Use an ObjectDataSource control and set its TypeName property to System.Data.SqlClient.SqlConnection. 

B. Use a SqlDataSource control and configure its ConnectionString in the web.config file. 

C. Use an XmlDataSource control together with an Xml control that represents the database. 

D. Use a LinqDataSource control with entity classes that represent the elements in the database. 

Answer: BD 


70-515 vce

Far out 70-515 vce:

Q21. You are creating an ASP.NET Web application. The application must call a WCF service by using a WCF routing service. You need to ensure that the application can invoke the target service by using the router endpoint. 

What should you do? 

A. Add a service reference to the router service. In the client binding configuration, specify the address of the router service. 

B. Add a service reference to the target service. In the client binding configuration, specify the address of the target service. 

C. Add a service reference to the router service. In the client binding configuration, specify the address of the target service. 

D. Add a service reference to the target service. In the client binding configuration, specify the address of the router service. 

Answer: D 


Q22. You are implementing an ASP.NET MVC 2 Web application. A controller contains the following code. 

Function Edit(ByVal id As Integer) As ActionResult Return View(SelectUserToEdit(id)) End Function Function Edit(ByVal person As Person) As ActionResult UpdateUser(person) 

Return RedirectToAction("Index") 

End Function 

The first Edit action displays the user whose details are to be edited, and the second Edit action is called when the Save button on the editing form is clicked to update the user details. An exception is thrown at run time stating that the request for action Edit is ambiguous. 

You need to correct this error and ensure that the controller functions as expected. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.) 

A. Add the following attribute to the first Edit action. <AcceptVerbs(HttpVerbs.Head)> 

B. Add the following attribute to the first Edit action. <HttpGet()> 

C. Add the following attribute to the second Edit action. <HttpPost()> 

D. Add the following attribute to the second Edit action. <HttpPut()> 

Answer: BC 


Q23. You are developing an ASP.NET web page that includes a textbox control that has ID txtDate. 

You need to ensure that the user enters a valid date in the text box. 

Which markup should you use? 

A. <asp:CompareValidator ID="valDate" runat="server" Type="Date" ControlToCompare="txtDate" Operator="Equal"/> 

B. <asp:CompareValidator ID="valDate" runat="server" Type="Date" ControlToCompare="txtDate" Operator="DataTypeCheck"/> C. <asp:CompareValidator ID="valDate" runat="server" Type="Date" ControlToValidate="txtDate" Operator="DataTypeCheck"/> 

D. <asp:CompareValidator ID="valDate" runat="server" Type="Date" ControlToValidate="txtDate" Operator="Equal"/> 

Answer: C 


Q24. You deploy an ASP.NET application to an IIS server. You need to log health-monitoring events with severity level of error to the Windows application event log. What should you do? 

A. Run the aspnet_regiis.exe command. 


B. Set the Treat warnings as errors option to All in the project properties and recompile. 


C. Add the following rule to the healthMonitoring section of the web.config file. 

<rules> 

<add name="Failures" eventName="Failure Audits" 

provider="EventLogProvider" /> 

</rules> 


D. Add the following rule to the healthMonitoring section of the web.config file. 

<rules> 

<add name="Errors" eventName="All Errors" provider="EventLogProvider" /> 

</rules> 


Answer: D 


Q25. You are developing an ASP.NET Web service. The following code segment implements the service. (Line numbers are included for reference only.) 

01 [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] 02 public class ProductService : 

System.Web.Services.WebService 03 { 04 [WebMethod] 05 public Product GetProduct(string name) 06 { 

08 } 

09 

10 [WebMethod] 

11 public Product GetProduct(int id) 

12 { 

13 

14 } 

15 } 


You need to ensure that both GetProduct methods can be called from a Web client. 


Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Remove line 01. 

B. Add the static modifier on lines 05 and 11. 

C. Add the following attribute before line 10. [SoapDocumentMethod(Action="GetProductById")] 

D. Modify the attribute on line 10 as follows. [WebMethod(MessageName="GetProductById")] 

Answer: AD 


70-515 test questions

Download 70-515 testing bible:

Q26. You are developing an ASP.NET Web page that includes a text box control. 

The page includes a server-side method named ValidateValue. 

You need to configure the page so that the text box value is validated by using the ValidateValue method. 

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Use the CompareValidator control. 

B. Use the CustomValidator control. 

C. Set ValidationGroup on the control to ValidateValue. 

D. Set OnServerValidate on the control to ValidateValue. 

Answer: BD 


Q27. You are implementing an ASP.NET page. You add and configure the following ObjectDataSource. 

<asp:ObjectDataSource SelectMethod="GetProductByProductId" ID="odc" runat="server" TypeName="ProductDAL"> <SelectParameters> <asp:Parameter Name="productId" Type="Int32" /> 

</SelectParameters> 

</asp:ObjectDataSource> 

The page will be called with a query string field named pid. 

You need to configure the ObjectDataSource control to pass the value of the pid field to GetProductsByProductId method. 

What should you do? 

A. Replace the asp:Parameter with the following declaration. 

<asp:QueryStringParameter DefaultValue="pid" Name="productId" 

Type="Int32" /> 


B. Replace the asp:Parameter with the following declaration. 

<asp:QueryStringParameter QueryStringField="pid" Name="productId" Type="Int32" / 


C. Add the following event handler to the Selecting event of the ObjectDataSource control. 

Private Sub odc_Selecting(ByVal sender As Object, 

ByVal e As _ 

System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs) _ 

Handles odc.Selecting 


D. InputParameters("pid") = Request.QueryString("productId") 

End Sub 


E. Add the following code segment to the pages code-behind. 

Protected Sub Page_Load(ByVal sender As Object, 

ByVal e As System.EventArgs) Handles Me.Load 

odc.SelectParameters.Add("productId", Request.QueryString("pid")) 

End Sub 


Answer: B 


Q28. 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? 

A. VaryByCustom="browser" 

B. VaryByCustom="User-Agent" 

C. VaryByHeader="browser" 

D. VaryByHeader="User-Agent" 

Answer: A 


Q29. You are adding new capabilities to an ASP.NET Web site. The site currently connects to a Microsoft SQL database by using the…. 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……. 

You need to add the ASP.NET roles support. 

Which two actions should you perform? 

A. Use the aspnet_regsql tool. 

B. Use the aspnet_regiis tool. 

C. Add the CONTOSO\AppIdentity user to the aspnet_Roles_FullAccess database role. 

D. Add the CONTOSO\AppIdentity user to the db_accessadmin database role. 

Answer: AC 


Q30. You are creating an ASP.NET Web site. The site contains pages that are available to anonymous users. The site also contains a page named Premium.aspx that provides premium content to only members of a group named Subscribers. 

You need to modify the web.config file to ensure that Premium.aspx can be accessed by only members of the Subscribers group. 

Which configuration should you use? 

A. <location path="Premium.aspx"> 

<system.web> 

<authorization> 

<allow users="Subscribers"/> 


<deny users="*"/> </authorization> </system.web> </location> 

B. <location path="Premium.aspx"> 

<system.web> 

<authorization> 

<allow roles="Subscribers"/> 

<deny users="*"/> 

</authorization> 

</system.web> 

</location> 


C. <location path="Premium.aspx"> 

<system.web> 

<authorization> 

<allow roles="Subscribers"/> 

<deny users="?"/> 

</authorization> 

</system.web> 

</location> 


D. <location path="Premium.aspx"> 

<system.web> 

<authorization> 

<deny users="*"/> 

<allow roles="Subscribers"/> 

</authorization> 

</system.web> 

</location> 


Answer: B 



see more 70-515 - TS: Web Applications Development with Microsoft .NET Framework 4