Home > Articles > Web Development > ASP.NET

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Summary

In this chapter, you took a detailed look at tracing in ASP.NET. You started by learning how to configure tracing in ASP.NET, at both the page level and the application level. This entailed adding attributes to the @Page directive and to the web.config file.

Next, you learned about the different sections that are included in the trace output at the page level. These include the Request Details, Trace Information, Control Tree, Cookies Collection, Headers Collection, Form Collection, QueryString Collection, and Server Variables Collection sections.

Following that, we discussed the primary player in the ASP.NET tracing process: the TraceContext class. You learned about its two properties, IsEnabled and TraceMode, and you learned how they can be used to control the trace output of your ASP.NET pages through the TraceContext object instance in the Page class's Trace property.

The TraceContext class's two methods, Write and Warn, were discussed next. Each of the three overloaded Write methods was explained and was correlated to the similar Warn method, which differs only in name and output appearance. We deferred the discussion of the constructor to the section on tracing via components, later in the chapter.

Then you learned how to both configure and use the Trace Viewer, as well as how it is accessed via an HttpHandler that intercepts requests for the trace.axd file.

Tracing in an ASP.NET web application is not just limited to ASP.NET pages. We also discussed how to leverage ASP.NET tracing from within components that your ASP.NET pages call. The chapter wrapped up with a few tips and techniques for utilizing ASP.NET tracing to its fullest potential.

In the next chapter, you'll get a thorough introduction to debugger in the Visual Studio .NET IDE.

  • + Share This
  • 🔖 Save To Your Account