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.
…ot be located.
…in the Formatting.Html project.
…w Formatting.Html and Formatting.Razor projects.
…n 4 not 4.5.
The old RazorViewEngine project could probably be removed.. the new Html is for handling Html formatting in the WebApi, it supports different types of parsers (as long as they are implemented of course). The .Razor project is for parsing Razor to Html.. I also added a ASP.Net Web Api project for showing how to use Razor stuffs.. it should of course be removed later.. in the final release.
…oads to RazorViewEngine to assist with use.
…Serializer as separate solutions.