PrepAway - Latest Free Exam Questions & Answers

You are developing an ASP.NET application that runs on Windows Server 2012.

You are developing an ASP.NET application that runs on Windows Server 2012.

An exception is preventing a page from rendering.

You need to view the trace information for the page.

Which

two actions should you perform? Each correct answer presents part of the solution.

A. Add the following markup segment to the web.config file:

B. Load the trace.axd page from the root of the website.

C. Add the traceEnable elem

ent to the Internet Information Service (IIS) Metabase section for the application.

D. Add the following markup segment to the web.config file:

Explanation:

D: You can control whether tracing is enabled or disabled for

individual pages. If tracing is enabled, when the page is requested, ASP.NET appends to the page a series of tables containing execution details about the page request. Tracing is disabled by default.

To enable tracing for a page

Include an @ Page directi

ve at the top of your .aspx file.

Add a Trace attribute and set its value to true, as shown in the following example:

<%@ Page Trace=-true- %>

You can also configure tracing in the Web.config file by setting the enabled, localOnly, and pageOutput attribute

s of the trace Element (ASP.NET Settings Schema)

B: To view trace details for a specific request

Navigate to Trace.axd in the root of your application.

For example, if the URL for your application is http://localhost/SampleApplication, navigate to http:/

/localhost/SampleApplication/trace.axd to view the trace information for that application.

Select the View Details link for the request that you want to investigate.

References:

https://msdn.microsoft.com/en-us/library/94c55d08.aspx

https://msdn.microsoft.com/en-us/library/wwh16c6c.aspx


Leave a Reply