I have the [HandleError] attribute set on my controller.
This is my action method:
public ActionResult ShowError()
{
throw new NullReferenceException();
return View();
}
This action method has a corresponding view.
I have set custom errors in the config
<customErrors mode="On">
</customErrors>
I have the Error.cshtml file in the shared folder under Views folder.
Now navigating to the ShowError controller method brings up this window in my IDE

On hitting F5 I get this in my browser window instead of the Error page from the shared folder.

What else is needed to be done to show the error page? How do I get the HandleError to work?
Thanks