I follow this guide for the HandleError:
blogs.msdn.com attribute
that I use this way (AccountController):
[HandleError(View="ErasErrorPage")]
public ActionResult Index()
{
ViewBag.admins = _accountMapper.GetAdmins(false);
ViewBag.members = _accountMapper.GetMembers(false);
ViewBag.Countries = _countryMapper.GetCountries();
return View();
}
This code throws an exception because _accountMapper.GetAdmins(false)it fails because of a System.Data.EntityException exception.
I put the ErasErrorPage view in my shared folder and I added <customErrors mode="On"/>, but ErasErrorPage is not displayed. All I get when an error occurs is a yellow screen of death saying:
Obviously, setting the mode to “Off” Or "Remote Control" does not solve the problem.
Does anyone have an idea why this is not working?
EDIT
http://localhost:3527/Account/Index, ErasErrorPage, . , - , - . ?
EDIT2
[HandleError(View="ErasErrorPage")] Public ActionResult methodName() { ... }, , , "." " "...