trace output stops appearing

J

JR

I'm experiencing a problem where, for seemingly no reason, trace output
stops being logged (and appearing on my pages.)

trace.enabled suddenly just turns to false.

Any idea why this happens? It actually is happening on 2 machines I work on.

Thanks.
 
S

Steven Cheng[MSFT]

Hi JR,

From your description, you found the Trace on your certain machine suddenly
stop working, all the pages or web application's Trace Enabled have been
set to false?

I'm not sure on your detailed condition, would you please confirm the
following things:
1.Have you ever done any change on the certain machine related to the
asp.net setting?

2. Since you mentioned the Page or WebApplication's Trace is set to
disabled, do you mean that each page's
@Page diretive has been set Trace=false ? or The Web.config file's Trace
element is also set to enabled=false?

3. If you manually set the Trace=true in @Page directive of each page and
enable the trace in the web.config, will it work? Or still not work no
matter how we set in @Page directive or web.config?

4. Also, I'm wondering what the detailed error info when you visit a web
page when the problem existing.

Please check the above items. If you have any other findings, please also
feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
J

JR

1. No changes have been made

2. I'm setting the trace in web.config as follows:

<trace enabled="true" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="true" />

I put a response.write(trace.isenabled) statement on the page so I can see
when tracing just turns off.

3. None of the pages have a separate tracing page directive set.

4. I'm not experiencing errors. I just am not getting my trace output.

-Jay
 
S

Steven Cheng[MSFT]

Hi Jay,

Thanks for the response. After some further testing , I also encountered
this behavior that the Trace.IsEnabled will return false even when the
configuration setting is enabled= true. I think the reason for the behavior
is below:

In the web.config 's <trace > element we generally have the following
settings:
<trace
enabled="true"
requestLimit="6"
pageOutput="true"
traceMode="SortByTime"
localOnly="false"
/>

The key point is the "localOnly" attribute, this attribute specifies the
number of trace requests to store on the server. The default is 10. If the
limit is reached, trace is automatically disabled.
Here is the reference in MSDN:
#<trace> Element
http://msdn.microsoft.com/library/en-us/cpgenref/html/gngrftracesection.asp?
frame=true

So when we post request to some pages in the web application serveral
times, if the times exceed the "requestLimit" setting, the Applicatin's
Trace will be disabled automatically. Please have a test to confirm this.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top