Click here to Skip to main content
15,884,388 members
Articles / Web Development / ASP.NET

Step by Step Guide to Trace the ASP.NET Application for Beginners

Rate me:
Please Sign up or sign in to vote.
4.54/5 (23 votes)
19 May 2010CPOL5 min read 158.8K   2.2K   52  
Explains the step by step approach to trace the ASP.NET application
<?xml version="1.0"?>

<configuration>

  <appSettings>
    <add key="ConnectionString" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|TraceDB.mdf" />
    <add key="MaximumRequests" value="2" />
  </appSettings>
    <connectionStrings/>
  <system.diagnostics>
    <trace autoflush="true">
      <listeners>
        <add name="WebPageTraceListener"
            type="System.Web.WebPageTraceListener, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
        <add name="DBTL" type="TraceDemo.DatabaseTraceListener,
                                                TraceDemo"/>
        <add name="myListener"
         type="System.Diagnostics.TextWriterTraceListener"
         initializeData="TextWriterOutput.log" />
        
      </listeners>
    </trace>    
  </system.diagnostics>
    <system.web>
      <trace
        pageOutput="true"
        enabled="true" 
        localOnly="false"
        requestLimit="10"
        mostRecent="true"
        traceMode="SortByTime"
        />
        <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
        <compilation debug="true" />
        <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
        <authentication mode="Windows" />
        <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
      <customErrors mode="Off"></customErrors>
    </system.web>
  
</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Cognizant Technology Solutions
India India
Having more than 9 years of experience in Programming and web application development.

Writing technical blog articles, learning new Programming languages , frameworks and sharing knowledge with others is one of my hobby. The more I learn, more I understood that how little I know and that drives me to dig into technology and languages to explore.

From last few years now, working on Salesforce platform and providing customer solutions using force.com as an Architect and Technical Lead Role. I have worked on many area of Salesforce like force.com, Heroku, PHP Toolkit, Partner Webservices, Metadata and Enterprise webservices, Tooling API, Customer Portal, Partner Portal, Community, Salesforce1 etc...

Blog:http://www.jitendrazaa.com/blog

Comments and Discussions