Hello,
I have created a new MVC Application in VS2010 straight out the box. In the Home Controller I have ther following:
[HandleError(View = "Error")]
public ActionResult Index()
{
int num1 = 0;
int num2 = 5;
int result = num2 / num1;
return View();
}
This creates an error and a debug pop up and then if I continue a yellow screen. I cannot get it to redirect to the Error.aspx page. I have the web.config like this:
<customErrors mode="On" defaultRedirect="~/Error.aspx">
</customErrors>
but it will not redirect to the correct error page despite being a brand new project. How do I configure this to work please????
thanks