Tuesday, May 10, 2011

How to use Microsoft Enterprise Library Exception Handling and Logging Application blocks to log exceptions in rolling log files

  1. Configure your configuration file.
  1. Add exception handling block
  2. Add exception policy
  3. Add exception type
  4. Add exception logging handler
  5. Modify the trace listener by removing the default to a rolling log file
  6. Configure all the values

  1. Add reference of MABs (exception and logging) in your app as shown below

  1. Handle the exception…

Running the code would generate the rolling log file in your web application directory.
trivedimehulk@gmail.com

No comments:

Post a Comment