I have a VS 2010 MVC2.NET 4.0 web application. ASP.NET tracing is enabled both in the page directive (Trace = "true) and in Web.config:
<trace enabled="true" requestLimit="10" pageOutput="true" traceMode="SortByTime" localOnly="true" writeToDiagnosticsTrace="true" />
A standard listening tracer is also configured in Web.config:
<trace autoflush="true" indentsize="4"> <listeners> <add name="WebPageTrace" type="System.Web.WebPageTraceListener, System.Web, Version=4.0.30319.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <add name="TextWriterTrace" type="System.Diagnostics.TextWriterTraceListener" initializeData="textListener.log" /> </listeners> </trace>
Tracing works fine with the controller, but when I add Trace to the View (.aspx), nothing is displayed:
<% System.Diagnostics.Trace.WriteLine("Message System.Diagnostics.Trace from View"); %> <% Page.Trace.Write("Message Page.Trace from View"); %>
Is this supposed to work? Is there anything else that is needed to enable tracing from the view?
thanks
AUSTX_RJL
source share