Last post Oct 19, 2012 02:38 AM by Angie xu - MSFT
Oct 12, 2012 07:36 AM|Gibson|LINK
Hi, I'm trying to override the default behavior of asp.net trace in an application that I'm extending.
This app does not use the web.config trace element for configuration but some custom key and a Page.Trace.IsEnabled=false (or true) inside Page_Load
In this way trace infos are displayed in the page output, I would like to use the trace.axd utility instead so I tried to force Page.Trace.IsEnabled=true even when the base app sets it to false, hoping that the pageOutput attribute of trace element controls
how trace is displayed but with no results.
Can I forse the app to go back to standard configuration or when the trace is enabled by code there no way to cancel this setting?
Thanks in advance
Oct 19, 2012 02:38 AM|Angie xu - MSFT|LINK
When you enable tracing for the whole application in the Web.config file, trace information is gathered and processed for each page in that application. To override the application-wide settings, set the
Trace attribute in that page's
@ Page directive to false. Any
Warn statements that you include in a page's code are stored and returned to the trace viewer only.
Note: please check ASP.NET