Use trace.axd for a single page
Is there a way to use the trace.axd handler for tracing a single page on my site? I'm trying to monitor something in production, so I don't开发者_如何学Go want tracing output to the page, but I also want to limit the output to a specific page.
Edit: I also would prefer to have a running record of the requests aggregated, like trace.axd does.
You can enable page-level tracing (it will not use trace.axd, the output will still be in the page)
With Trace.IsEnabled you can also enable page-level tracing programmatically, so you can show the trace information in the page only if certain conditions are met (for instance you could have a parameter in querystring where you can say yourpage.aspx?displayTraceInfo=true
). This way you would not risk having all your users see the trace information in the page.
精彩评论