Why does asp.net trace only work from time to time?

ASP.NET tracing seems very erratic. Sometimes it is traceable, and sometimes not.

I am tracing from my ASCX using ...

Trace.Write ("etc. etc.");

My web.config looks like this ... (in WSS3) First I guarantee that SharePoint allows you to track page level ...

<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="true">

Here is my ASP.NET trace element ...

<trace enabled="true" localOnly="false" pageOutput="true" writeToDiagnosticsTrace="true" />

And my trace of System.Diagnostics ...

<system.diagnostics>
<trace autoflush="true" indentsize="4" >
    <listeners>
        <add name="listen" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\asptrace\log.txt" />
        <add name="listen2" type="System.Web.WebPageTraceListener, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"  />
    </listeners>
</trace>

Anything obvious I'm missing?

+3
source share
1 answer

Have you checked the request restriction in your web.config? The default value is 10, which means that after starting the application, you will receive only the traffic of the first 10 requests.

<trace enabled="false" requestLimit="10" />
+9

All Articles