removing some values from trace

G

Guest

is there any way to remove some information from trace, tracing by default
displays session , application variables, but i need to remove these two from
trace.can any let me know how can i do it?
 
G

Guest

As we dont want to display Application/session variables on the form.. we
just want to display other trace info except this.
 
K

Karl Seguin

You should only be using/showing this information for debugging purposes in
development.

The only solution I know that might work would be to hide the table
containing the data using javascript. However, you could simply view it
using "view source"

Karl
 
G

Guest

Yes,the tracing is only enabled in development environment and enabling
tracing dynamically based on some value in the page, if hiding some part is
not possible is there any global setting which overrides the page settings?
 
K

Karl Seguin

As I said, I think you are pretty much out of luck.

Get Reflector and look at what the Page class does during ProcessRequest().
You'll note that it calls ProcessRequestMain (which is where all the page
events are fired, init, load, postback, ...) and then it calls
ProcessRequestEndTrace which calls Trace.EndRequest() if tracing is enabled.

EndRequest simply goes through each collection (context.Session) and adds
all the values to the trace.

Unfortunetly, all these methods are internal.

To get it to work, you would need to register .aspx with a different handler
(doable via machine.config) and rewrite most of the code of the page
class....a daunting task.

Karl
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top