You work as a Web Application Developer for SunInfo Inc. The company uses Visual Studio 2008 as
its application development platform. You create a Web application named Website1 using .NET
Framework 3.5. You enable tracing by editing the Web.config file of your application. You have
written the following code in Web.config:
<configuration>
<system.web>
<trace enabled=”true”
pageOutput=”true”>
</system.web>
</configuration>
You want to view the entire log of your application. Which of the following actions will you perform
to accomplish the task?
A.
Navigate to the Trace.aspx page on the Web application.
B.
Navigate to the Trace.axd page on the Web application.
C.
Navigate to the Trace.html page on the Web application.
D.
Navigate to the Trace.asmx page on the Web application.
Explanation:
You can view the trace output by navigating to the Trace.axd page on your application. This page
shows a log event when pageOutput is set to true. The first page of the log contains a list of trace
results that are in the cache. You can view the details of the trace record for a single page by clicking
on one of the cache results.
Answer A is incorrect. The Trace.aspx page represents a simple Web form and cannot show trace
output for the entire log. However, if the trace attribute of the @ Page directive is set to true,
tracing is enabled at the page level.
Answer D is incorrect. The Trace.asmx page represents a Web service and does not show the trace
output in the current scenario.
Answer C is incorrect. The Trace.html page represents a simple html page and cannot show trace
results.