Last post Jul 11, 2011 02:10 PM by Sachin303
May 18, 2011 03:58 PM|Sachin303|LINK
I am working on a project where we have used few of the web application plateforms & techniques. I need to build a robust exception handling framework for my applications that handles all type of exceptions i.e server exception, unhandled exception, http
module exception and custom raised exception etc.
In our projects,
1) we have static ASP.net pages (without code behind) for jQuery menus which uses jquery ajax and custom HttpHandler to fetch the data from the server.
2) some aspx pages load and save application data using jQuery ajax and custom httpHandlers.
3) some functionalities are developed in MVC3 which uses strongly and non strongly type views. Strongly type view save the data through controller on page submit and non strongly type view used jQuery ajax and json to save the data from controller.
4) We are also using HttpModule in our web site to authenticate the user.
Please guide me how to handle exception from multiple sources and display custom error message to the user from asp.net pages and jquery ajax calls?
Jun 24, 2011 04:32 PM|atconway|LINK
I would look into some pre-existing exception handling frameworks to see how many of the areas of your app they will cover, and then proceed further to other exception handling only if needed. Using the same framework for client side and server side errors/exceptions
is not probably going to be in a framework by default. The frameworks will most likely focus on .NET exceptions server side. What you could so client-side is raise a server side event if an error occurs using AJAX.
I would begin by looking at the following frameworks to get started:
MSFT Enterprise Library: The Exception Handling Application Block:
elmah - Error Logging Modules and Handlers for ASP.NET:
Jul 11, 2011 12:27 AM|Sachin303|LINK
Thank you for your suggestion. I have heard about these frameworks but never go through them. Could you please forward few benefit of using these frameworks over default .net framework exception handling techniques ?
Jul 11, 2011 10:35 AM|atconway|LINK
I have heard about these frameworks but never go through them. Could you please forward few benefit of using these frameworks over default .net framework exception handling techniques ?
They still use the "Default .NET Framework Techniques", it is just they are much more robust wrappers to the default exception handling behavior that gives the developers more ability to capture and report exceptions. The main benefit is not having to write
your own exception handling framework and use one already built on proven standards. You might want to read through some of the examples in the Enterprise Application Block link I provided to see how exactly they work and if this will benefit you at all.
Jul 11, 2011 02:10 PM|Sachin303|LINK
ok. i understand. First i will go through through these frameworks and check out the benefits that i can gain from these. Thank you so much !!