Sams Teach Yourself ASP.NET in 21 Days, Second Edition By Chris Payne
Table of Contents
Day 20. Debugging ASP.NET Pages
Q&A
Q1:
Will changes made in a try block before an error be kept or rolled back?
A1:
Because execution continues after the try block, any changes are kept. To be able to roll back changes made within try blocks, use transactions.
Q2:
Is there a way to write trace information to a persisted log?
A2:
Unfortunately, not directly. However, using the file I/O methods you learned on Day 13, "Reading and Writing Files on the Web Server," capturing custom trace information shouldn't be a problem. You can simply save the output HTML file to capture all the trace information.