module 6 tracing in microsoft asp net web applications
Download
Skip this Video
Download Presentation
Module 6: Tracing in Microsoft ASP.NET Web Applications

Loading in 2 Seconds...

play fullscreen
1 / 14

Module 6: Tracing in Microsoft ASP.NET Web Applications - PowerPoint PPT Presentation


  • 110 Views
  • Uploaded on

Module 6: Tracing in Microsoft ASP.NET Web Applications. Overview. Understanding Tracing Remote Debugging. Understanding Tracing. Runtime Information Enabling Tracing Using the Trace Object Viewing Trace Results Using Application-Level Trace

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Module 6: Tracing in Microsoft ASP.NET Web Applications' - lundy


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
overview
Overview
  • Understanding Tracing
  • Remote Debugging
understanding tracing
Understanding Tracing
  • Runtime Information
  • Enabling Tracing
  • Using the Trace Object
  • Viewing Trace Results
  • Using Application-Level Trace
  • Demonstration: Tracing Through a Web Application
  • Tracing into a Component
runtime information
Runtime Information
  • During runtime, you can:
    • Output values of variables
    • Assert whether a condition is met
    • Trace through the execution path of the application
  • You can collect runtime information using:
    • The Trace object
    • The Debug object
enabling tracing
Enabling Tracing
  • Page-level tracing displays trace statements only on the configured page
  • Enabling page-level tracing
  • Application-level tracing displays trace information for all pages in a Web application
  • Enabling application-level tracing in the Web.config file
  • Practice: Check default settings

<%@ Page Language="vb" Trace="true" %>

<%@ Page Language="c#" Trace="true" %>

<trace enabled="true" pageOutput="true"

localOnly="true"/>

using the trace object
Using the Trace Object
  • Inserting trace messages
  • Conditional execution with Trace.IsEnabled
  • Dynamically change state of trace

Trace.Write ("category", "message")

Trace.Warn ("category", "message")

If Trace.IsEnabled Then

strMsg = "Tracing is enabled!"

Trace.Write("myTrace", strMsg)

End If

if (Trace.IsEnabled)

{

strMsg = "Tracing is enabled!";

Trace.Write("myTrace", strMsg);

}

Trace.IsEnabled = False

using application level trace

Page

Application

Result

Trace=True

Trace=True or Trace=False

  • Trace results are displayed on page

Trace=False

Trace=True or Trace=False

  • Trace results are not displayed

Trace not set

Trace=True

  • Trace results are displayed on page
Using Application-Level Trace
  • Application-level trace statements are displayed on individual pages
  • Set pageOutput=false in the Web.config file and trace results are viewable by trace viewer

http://server/project/trace.axd

demonstration tracing through a web application
Demonstration: Tracing Through a Web Application
  • Page-level tracing
  • Application-level tracing
tracing into a component
Tracing into a Component
  • Import the System.Web Library
  • Enable Tracing
  • Call Trace methods

Imports System.Web

using System.Web;

HttpContext.Current.Trace.IsEnabled = True

HttpContext.Current.Trace.IsEnabled = true;

HttpContext.Current.Trace.Write _

("component", "this is my trace statement")

HttpContext.Current.Trace.Write

("component", "this is my trace statement");

lesson remote debugging
Lesson: Remote Debugging
  • How to Perform Remote Debugging
how to perform remote debugging
How to Perform Remote Debugging
  • Remote debugging:
    • Debug Web applications remotely
    • Simplifies team development
    • Simplifies Web site management
  • Requirements for remote debugging:
    • Requires Visual Studio .NET or remote components on the server
    • Visual Studio .NET must be installed on the client
    • Requires administrative access to the server
    • Requires access for the user who is performing debugging
review
Review
  • Understanding Tracing
  • Remote Debugging
lab 6 tracing in microsoft asp net web applications
Lab 6: Tracing in Microsoft ASP.NET Web Applications

Logon Page

Login.aspx

BenefitsHome PageDefault.aspx

CohoWinery

Page HeaderHeader.ascx

ASPState

Menu ComponentClass1.vb or Class1.cs

Registration

Register.aspx

Web.config

tempdb

Life InsuranceLife.aspx

RetirementRetirement.aspx

MedicalMedical.aspx

DentalDental.aspx

XML Web ServicedentalService1.asmx

ProspectusProspectus.aspx

DoctorsDoctors.aspx

User Controlnamedate.ascx

Lab Web Application

XML Files

Doctors

Dentists

ad