user310291
user310291

Reputation: 38180

I can't see any trace output in ASP.NET

In Visual Studio 2010 I added Trace to Page_Load as explained here http://www.asp101.com/articles/robert/tracing/default.asp but I can't see any Trace output, why ?

public partial class _Default : System.Web.UI.Page {

    protected void Page_Load(object sender, EventArgs e) {

        Trace.IsEnabled = true;
        Trace.Write("Hello World");

    }

}

Upvotes: 2

Views: 443

Answers (2)

Daniel Dyson
Daniel Dyson

Reputation: 13230

You might also want to check that the following is not set in your machine config:

 <deployment retail="true" /> 

$WINDOWS$\Microsoft.NET\Framework\version\CONFIG

This setting disables tracing for all sites on a machine regardless of the web.config and page settings

Upvotes: 1

UserControl
UserControl

Reputation: 15159

do you have something like that in your web.config?

<system.web>
      <trace enabled ="true" pageOutput ="true"  />        
</system.web>

check this article

Upvotes: 1

Related Questions