Exceptional handling in ASP.NET C# [Resolved]

Posted by Ankiprati under C# on 11/2/2015 | Points: 10 | Views : 645 | Status : [Member] | Replies : 2
Exceptional Handling

An exceptional is an unexpected error that we are knowing it will occur when the program runs.

Examples
1. Trying to read from a file that does not exist,throws file error not found exception.
2. Trying to read from a database table that does not exist, throws a sql exception.

Showing actual unhandled exception to the user is bad for two reasons
1. Users will be annoyed as they are cryptic and does not makes much sense to the end user.
2. Exception contains information that can be used for hacking into your application.




Responses

Posted by: Sheonarayan on: 11/2/2015 [Administrator] HonoraryPlatinum | Points: 50

Up
0
Down

Resolved
Are you asking a question or explaining Ankiprati?

To know about Exception handling scenarios, read this article http://www.dotnetfunda.com/articles/show/1943/exception-handling-scenarios-in-net.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Ankiprati, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lucygrey on: 12/14/2015 [Member] Starter | Points: 25

Up
0
Down
Hi,
I will suggest to you write your own exception module and handler to find unexpected error in ASP.Net.

Helpful resources:

http://stackoverflow.com/questions/5894669/asp-net-unexpected-error-handling-send-mail-and-redirect-to-error-aspx
http://www.asp.net/web-forms/overview/getting-started/getting-started-with-aspnet-45-web-forms/aspnet-error-handling



http://www.keenesystems.com/Services/SoftwareDevelopment.aspx

Ankiprati, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response