I am using Structure map like the MVC storefront by Rob Conery does and I have an AdminController and so to get to it I just type:
website/Admin/action
however if I miss spell the controller name I get the error below:
Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: key
There error occurs on this line:
Controller controller = ObjectFactory.GetInstance(controllerType) as Controller;
Does anyone have any ideas on how I can handle this error or not allow it to happen at all and maybe just goto a 404 page??
Cheers in advance