I have an ASP.Net MVC 2 web application where I have HomeController. Index method generates unauthorized exception. I have customErrors=on. Now I want to show a view Error.aspx in shared folder with Exception.Message. But I get Resource not found /Error in browser.
Note: I had gone through all the related links on StackOverflow.
any help?
Step by step:
Modify the HomeController so that it looks like this:
Add the following to the
<system.web>section of web.config:Run the application
~/Views/Shared/Error.aspxis shown