I have added a HttpError, so when a controller throws an error, the HttpError.cshtml page will be used. Works well in Crome, but IE will show its own 500 Error page. I also added a start page, so when starting up the MvcWebApiSiteTest, the Index.cshtml page will be displayed. The idea of that start page is to give a few intro about how to use this Razor feature.
The problem with the code was: If one of the ViewParser or ViewLocator was null, it replace both from the Dependency Resolver, but it only passes them to the HtmlMediaTypeViewFormatter if both was resolved. The fix will now take any of them.. To decide: We can add a check that make sure both must exists in the IoC container and throw an exception if they don't, or let them mix between using the global config's DefaultXXXX and also register one of them in a IoC containter.. I think if one is only registred in the IoC but the other is specified as a default, the code should still work.
…in the Formatting.Html project.
…w Formatting.Html and Formatting.Razor projects.
…n 4 not 4.5.
…oads to RazorViewEngine to assist with use.
…stionable, as is the license usage. #63
Added Extension to HttpConfiguration to use web.config custom errors