[Mono-bugs] [Bug 60739][Blo] New - ASP.NET Trace pageOutput and localOnly Bug(s)
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 25 Jun 2004 06:56:24 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by davidandrewtaylor@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=60739
--- shadow/60739 2004-06-25 06:56:24.000000000 -0400
+++ shadow/60739.tmp.7256 2004-06-25 06:56:24.000000000 -0400
@@ -0,0 +1,67 @@
+Bug#: 60739
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Blocker
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: davidandrewtaylor@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Summary: ASP.NET Trace pageOutput and localOnly Bug(s)
+
+Description of Problem:
+There are 2 nasty bugs in MONO (I checked in the current CVS built)
+regarding the ASP.NET trace feature.
+
+Take this web.config setting:
+<trace enabled="true" pageOutput="false" localOnly="true" />
+SUMMARY:
+Bug A) Mono ignores the PageOutput setting and always outputs trace
+information to the page irrespective of this setting.
+Bug B) The localOnly setting is incorrectly implemented and decides if
+the request is local or remote only on the first request (when the page
+is parsed) and all future requests incorrectly use this same setting.
+DETAIL:
+Bug A: pageOutput
+The pageOutput attribute can be used to stop trace information appearing
+at the bottom of an ASPX web page (but you can still view it via the
+Trace.axd handler). I assume this can be easily fixed in "Page.cs" by
+changing the method "private void RenderTrace (HtmlTextWriter output)".
+It could be as easy as changing the last line from:
+- Trace.Render (output);
+to
++ if (HttpRuntime.TraceManager.PageOutput) Trace.Render (output);
+
+I have not tried the above fix but it would appear correct?
+
+Bug B): localOnly
+If localOnly="true" the Trace should only be shown when serving requests
+to a web browser on the same machine; however with the current
+implementation a boolean seems to be evaluated on the very first request
+(when the page is Parsed). So if the first request is from a localhost
+browser the page is correctly shown with trace information. If you then
+move to a remote browser and hit the page (without restarting XSP) the
+trace information will incorrectly be shown. And Visa-versa if you first
+view remotely the trace will correctly not be shown; but then if you view
+on localhost the trace will still not be shown (which is incorrect).
+
+In the class "PageParser.cs" there is a method "internal override void
+ProcessMainAttributes (Hashtable atts)". Deep inside this method the
+following code appears:
+-----
+if (traceConfig.LocalOnly && !Context.Request.IsLocal) {
+ haveTrace = false;
+ trace = false;
+}
+-----
+
+Obviously the decision as to if trace information is displayed needs to
+be made "For Every Request" and not just with the very first request.
+
+Let me know if I can help any further with this. Thanks.