Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 130555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:57:59+00:00 2026-05-11T05:57:59+00:00

I am having problems using the [HandleError] attribute on my Controller Actions – it

  • 0

I am having problems using the [HandleError] attribute on my Controller Actions – it doesn’t seem to work at all (i.e. it doesn’t matter if the filter is there or not – I get the same results…). When an Exception is thrown, I get the standard red-toned Server Error in ‘/’ Application error page instead of my custom view.

I have found a couple of other threads on the subject here on SO, and in most cases it seems that setting the customErrors option to On in web.config solved the problem. It has not for me, so I need to find a different solution.

My controller action:

[HandleError] public ActionResult Index() {     throw new Exception('oops...');     return View(); } 

In my web.config file

<customErrors mode='On'></customErrors> 

I have made sure that the Error.aspx file is in the Shared directory, too. What am I missing?

I am running ASP.NET MVC RC Refresh.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T05:58:00+00:00Added an answer on May 11, 2026 at 5:58 am

    Two useful things to know:

    By default, HandleError does nothing when running under the development server. The intention is to show developers more useful information:

    public virtual void OnException(ExceptionContext filterContext) {     if (filterContext == null) {         throw new ArgumentNullException('filterContext');     }      // If custom errors are disabled, we need to let the normal ASP.NET     // exception handler execute so that the user can see useful     // debugging information.     if (filterContext.ExceptionHandled         || ! filterContext.HttpContext.IsCustomErrorEnabled) {         return;     } 

    Note that this case is precisely what customError is supposed to control. If setting customError='On' does not change this behavior:

    1. Check your syntax.
    2. Make sure you’re editing the Web.config in the project root, not the one in Views.
    3. Make sure no code sets HttpContext.IsCustomErrorEnabled.
    4. If all else fails, try turning debug off in Web.config

    Second, there certain types of errors which HandleError will never handle, notably ASP.NET compilation errors. You don’t say which error you’re encountering.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 137k
  • Answers 137k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Well, I attempted something that is far from perfect, but… May 12, 2026 at 7:19 am
  • Editorial Team
    Editorial Team added an answer As chaos points out, you will encounter some difficulties using… May 12, 2026 at 7:19 am
  • Editorial Team
    Editorial Team added an answer Yes. In the documentation to Slime you will find slime-lisp-implementations.… May 12, 2026 at 7:19 am

Related Questions

I am having problems using the [HandleError] attribute on my Controller Actions - it
I am having problems using the Visual Studio 2008 Javascript debugger. I can’t set
I have received a content export of a MOSS 2007 site which I need
I am having problems using django-tagging . I try to follow the documentation but
I am having problems using Gzip compression and JQuery together . It seems that

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.