I wrote this question a few days ago, and though I got a few upvotes, I didn't get much action. This is why I have chosen to re-visit this question in a new way.
I'm trying to send a user to my NotFound
view which is located in my Shared directory whenever they request a controller or action that doesn't exist. You'll see my own answer in the previous question which is a working work-around, however it still requires me to have an ErrorController
and an /Error/NotFound.vbhtml
View. I think that this is rather ridiculous since I'm only serving up static content from that view.
What I'd like to do is render the view from the shared directory without the need for a Controller. This is where my idea of a Custom Controller Factory comes in... I just don't know how to go about doing it.
How can I build a Custom Controller Factory that will behave exactly the same as the Default Controller Factory, except for when I need to show the NotFound view (while keeping the source URI intact of course)?