Trace.Writing in your web applications
- Posted: Dec 24, 2009 at 9:45 PM
- 495 Views
We've talked in the past about debugging your application but if you can't attach a debugger to your website, why not use the ASP.Net Tracing? This acts very much like a Debug.WriteLine in a Windows application but instead you do Trace.Write.
Since this does have some memory ramifications, you'll have to add in a line to your web.config file under the System.Web section.
<system.web> <!-- Add me! --> <trace enabled="true" mostRecent="true" pageOutput="true" requestLimit="20" />
Then you just go to your trace.axd file. So in an example where your application is in “WebSite1” and on your local development box, http://localhost/WebSite1/trace.axd would be where to get this information