Developing ASP.NET MVC Web Applications — Question 149
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.
Answer options
- A. Add the following markup segment to the web.config file: <trace mostRecent= "true/">
- B. Load the trace.axd page from the root of the website.
- C. Add the traceEnable element to the Internet Information Service (IIS) Metabase section for the application.
- D. Add the following markup segment to the web.config file: <trace enabled= "true/">
Correct answer: B, D
Explanation
The correct answers are B and D. Accessing the trace.axd page (B) allows you to view the trace information directly, while enabling tracing in the web.config file with <trace enabled= "true/"> (D) activates the tracing feature. Options A and C are incorrect because they do not provide the necessary setup to view trace information for the application.