How to handle exception in ASP.NET web application.
Please say me details at higher level.
Suppose, I am working on any big asp.net web application.
Application is simply 3 tier architecture.
1) Presentation Layer
2) Business Layer
3) Database Layer
I want handle exception for above 3 layer and save all error log in database with description, error code, error number and other things which are important.
How can we create separate classes for every layer.
please tell me in details.
Not for demo purpose for big web application.


Nitin SontakkeRank #264 · 9.6K reputationPosted Oct 5, 2016, 9:56 PM EDT
Francis SusaimichaelRank #466 · 5.4K reputationPosted Oct 5, 2016, 11:10 PM EDT
As Nitin said, I'magree thatexception handling is a tricky part.AFAIK, You must handle all the exception in business layer. There are lot of open source libraryout in the net.Log4Net ismost popular among them. The below tutorials talk about the basics thought of Exception handling in .Net perspective:
In the database side, you should rely on the built in exception handling techniques and youcan follow MS suggestedbest practices.
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Oct 6, 2016, 2:28 AM EDT