1
vote
1answer
26 views

Where is the proper place to attach for catching ALL ASP.NET MVC errors?

I'm adding error handling for our asp.net mvc 3 application. Basically I want to catch every unhandled error short of a nuclear meltdown. I've identified the following spots for doing this: ...
0
votes
0answers
49 views

Custom ErrorPage is not Working with [HandleError(ExceptionType = typeof(NotImplementedException), View = “CustomErrorView”)]

I am trying to handle exception in asp.net MVC application using [HandleError]. I changed in web config <customErrors mode="On" /> Its not working for Cutom Error Like NotImplementedException ...
3
votes
2answers
60 views

Converting system errors into friendly messages

I want to know if there is a good way to convert system generated errors into something more meaningful for the user. for example if for some reason the application could not connect to the SMTP ...
1
vote
1answer
174 views

what is the best way for exceptional handling in MVC (Base_Controller vs CustomHandleErrorAttribute)

I am doing exceptional handling in MVC in Three models. public class CustomHandleErrorAttribute : HandleErrorAttribute { public override void OnException(ExceptionContext filterContext) { ...
4
votes
1answer
703 views

Automatic C# MVC Error Handling

I've got this code. public ActionResult Index() { ReceiptModel model = new ReceiptModel(); try { model = new ReceiptModel(context); } catch ...
0
votes
1answer
464 views

WebAPI Controller error Handling

I have a issue in implementing Error handling in Web-APi [HttpGet] public UserAccount Get() { throw new HttpResponseException( new ...
5
votes
2answers
338 views

SqlMembershipProvider Membership.GetUser by name failing

The problem Membership.GetUser works fine if I use the GUID, but fails if I try it without parameters or with the name: //This works and adds records to aspnet_user & aspnet_Membership tables ...
1
vote
3answers
158 views

What is an appropriate way to handle or throw exception from service layer of n-tier ASP.Net MVC application?

I have a web application with three layers: Web > Services > Core. Services has a bunch of business logic that helps Web construct and interpret viewModels. Sometimes there might be a problem in the ...
0
votes
0answers
65 views

Handling Runtime View Binding errors MVC3

I am trying to figure out a way wherein if an error occurs during the binding of a model to a view, I can simply redirect to a standard "A Catastrophic Error has occurred Page". E.g. Controller ...
6
votes
4answers
173 views

Does wrapping and rethrowing an exception impact performance?

I have followed this way of handling exception in my application. But my lead said I am doing it wrong. I am simply wrapping and rethrowing the same exception, which will impact performance. What is ...
4
votes
2answers
65 views

How to handle data between two function call one after other

I need to use two database function one in which i need to delete comment and after that second function called which decreases the score of user . Problem : If exception occurs in second function ...
7
votes
3answers
3k views

ASP.NET MVC 4 - Exception Handling Not Working

When an error occurs in my ASP.NET MVC 4 application, I would like to customize a view for the user depending on the type of error. For example, page not found or an exception has occurred (with some ...
4
votes
4answers
114 views

In MVC what is the best method to manage exceptions or errors in the business?

In MVC what is the best method to manage exceptions or errors in the business? I found several solutions but do not know which to choose. Solution 1 public Person GetPersonById(string id) { ...
0
votes
1answer
145 views

how to log exceptions in asp .net mvc2 application

Sometimes exceptions occur in my ASP .NET MVC 2 application. ASP .NET shows standard error page to user. Programmer doesnt have any information that such exception occurs. How to log those exceptions ...
2
votes
2answers
248 views

Catching exceptions for displaying info

I have setup so that if an Exception is thrown I can display it with my custom error page. But in some cases I don't want to be navigated to the error page, but want it to display a simple dialog ...

1 2 3 4 5 7
15 30 50 per page