A good post i feel.
I’ll first introduce you to a problem we recently had that required the dynamic provision of a class for a particular task and then discuss how we came to solve it using the reflection method Assembly.CreateInstance().
We have many websites – well into double figures – that all utilise a common exception monitoring HttpModule that we wrote. This module is very pluggable and can also be used by third party sites that we either host or assist with developing.
The ExceptionModule, on a basic level does the following:
- In the Init() method subscribes to the HttpApplication.Error event
- Once the error is caught, logs the exception details (in database, event log, xml file depending on setting)
- Looks to transfer the request to a “landing page”- obtained from web.config setting
This landing page reports a branded apology to the end user for browsers and changes the HttpResponse header so that…
View original post 879 more words