web analytics

New Microsoft 70-515 Exam Questions and Best 70-515 Dumps Download (21-30)

QUESTION 21
You use the ASP.NET Web Site template to create a Web site that will be deployed to multiple locations.
Each location will specify its SMTP configuration settings in a separate file named smtp.config in the root folder of the Web site. You need to ensure that the configuration settings that are specified in the smtp.config file will be applied to the Web site. Which configuration should you use in web.config?
211

Answer: B

QUESTION 22
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?
221
Answer: D

QUESTION 23
You are developing an ASP.Net web application. The application includes a master page named CustomerMaster.master that contains a public string property name EmployeeName application also includes a second master page named NestedMaster.master that is defined by the following directive.
<%@ Master Language=”C#”
MasterPageFile=”~/CustomMaster.Master”
CodeBehind=”NestedMaster.Master.cs”
Inherits=”MyApp.NestedMaster”%>
You add a content page that uses the NestedMaster.master page file.The content page contains a label control named lblEmployeeName. You need to acces the EmployeeName value and display the value within the lblEmployeeName label. What should you do?
231
Answer: A

QUESTION 24
You´re developing an ASP web page. the pages requires access to types that are defined in an assembly named Contoso.businessobjects.dll. You need to ensure that the page can access these types.

A.    <%@ assembly ID= “Contoso.bussinessobjects” %>
B.    <%@ assembly target name= “Contoso.bussinessobjects” %>
C.    <%@ assembly name= “Contoso.bussinessobjects” %>
D.    <%@ assenbly Virtual Path= “Contoso.bussinessobjects” %>

Answer: C

QUESTION 25
You are developing an ASP.NET web page. The page includes functionality to make a web request and to display the responde in a specified HTML element. You need to add a client-side function to write the response to the specified HTML element.Which function should you add?
251
Answer: D

QUESTION 26
You are perfoming security testing on an existing asp.net web page.You notice that you are able to issue unauthorized postback requests to the page. You need to prevent unauthorized post back requests. which page directive you use?

A.    <%@Page strict = “true” %>
B.    <%@Page enableViewStateMac = “true” %>
C.    <%@Page EnableEventValidation = “true” %>
D.    <%@Page Aspcompact = “true” %>

Answer: C

QUESTION 27
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?

A.    Add the following configuration to the web.config file.
<configuration>
<system.web>
<pages theme=”General”/>
</system.web>
</configuration>
Set the following page directive on pages that have customizations.
<%@ Page EnableTheming=”true” %>
B.    Add the following configuration to the web.config file.
<configuration>
<system.web>
<pages styleSheetTheme=”General”/>
</system.web>
</configuration>
C.    Add the following configuration to the web.config file.
<configuration>
<system.web>
<pages theme=”General”/>
</system.web>
</configuration>
Set the following page directive on pages that have customizations.
<%@ Page StyleSheetTheme=”General” %>
D.    Add the following configuration to the web.config file.
<configuration>
<system.web>
<pages theme=”General”/>
</system.web>
</configuration>
Set the following page directive on pages that have customizations.
<%@ Page EnableTheming=”false” %>

Answer: D

QUESTION 28
You are implementing an ASP.NET application.
You add the following code segment.
281 
You need to add code to return a list of all Person objects except those with a UserId that is contained in the secretUsers list. The resulting list must not contain duplicates. Which code segment should you use?
282
Answer: A

QUESTION 29
You are implementing an ASP.NET Web site.
The Web site contains a Web service named CustomerService.
The code-behind file for the CustomerService class contains the following code segment.
public class ProductService : System.Web.Services.WebService
{
    public List<Product> GetProducts(int categoryID)
    {
        return GetProductsFromDatabase(categoryID);
    }
}
You need to ensure that the GetProducts method can be called by using AJAX.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A.    Apply the WebService attribute to the ProductService class.
B.    Apply the ScriptService attribute to the ProductService class.
C.    Apply the WebMethod attribute to the GetProducts method.
D.    Apply the ScriptMethod attribute to the GetProducts method.

Answer: BC

QUESTION 30
You are implementing a WCF service library.
You add a new code file that contains the following code segment.
namespace ContosoWCF
{
    [ServiceContract]
    public interface IRateService
    {
        [OperationContract]
        decimal GetCurrentRate();
    }
    public partial class RateService : IRateService
    {
        public decimal GetCurrentRate()
        {
            decimal currentRate = GetRateFromDatabase();
            return currentRate;
        }
    }
}
You build the service library and deploy its assembly to an IIS application.
You need to ensure that the GetCurrentRate method can be called from JavaScript.
What should you do?

A.    Add a file named Service.svc to the IIS application.
Add the following code segment to the file.
<%@ ServiceHost Service=”ContosoWCF.IRateService” Factory=”System.ServiceModel.
Activation.WebScriptServiceHostFactory” %>
B.    Add a file named Service.svc to the IIS application.
Add the following code segment to the file.
<%@ ServiceHost Service=”ContosoWCF.RateService” Factory=”System.ServiceModel.
Activation.WebScriptServiceHostFactory” %>
C.    Apply the script service attribute to rate serice class Rebulid the WCF servicelibrary, and redploy the
assembly to the IIS application.
D.    Apply the Web get attibute to the Get Currant rate interface Method.Rebuild the WCF servicelibrary,
and redploy the assembly to the IIS application.

Answer: B

New Microsoft 70-515 Exam Questions and Best 70-515 Dumps Download