Search code examples
exceptionenterprise-library

Handling Policy based exception using MS Entlib 5.0


I would want to learn about MS Entlib 5.0. Frankly I have no idea what it is. Please provide me the links to start exploring. Then I Would have to evaluate whether the following requirements can be met using MS Entlib 5.0

1.Policy based exception handling & logging into both file and DB
2.Capability to enable detailed logging through trace/debug.
3Capability to overwrite business exception raised from stored proc or BO with a localized exception message for UI display

Please provide your valuable inputs on the above requirements.

Thanks in Advance, Manasa


Solution

  • Manasa, EntLib can help with all 3 scenarios you inquired about.

    EntLib is a collection of pluggable application blocks that address cross-cutting concerns, such as logging, exception management, data access, data validation etc. EntLib is configuration-driven (supporting both external configuration sources and programmatic config via fluent interface). It's a mature library which is currently in its 5th release and is built by Microsoft patterns & practices group.

    I recommend you start with the Enterprise Library Developer's Guide, in particular Chapters 1, 3 and 4. Then proceed with the Hands-On Labs. Based on your requirements, you would want to explore the Logging and Exception Handling set of exercises.

    Additional resources can be found at:

    • MSDN EntLib Dev Center is the home page where all final releases and documentation can be found.
    • EntLib Community Site - includes preview releases, ongoing work, community forum, issue database and other useful resources.