The view must derive from WebViewPage, or WebViewPage

You may checkout the following blog post which is more adapted to Razor.

But to answer your question, since you are now serving your views from a non standard location there is no longer the ~/Views/web.config file that applies and allows you to specify the base type for your razor views. So you might need to add the following on the top of each razor view:

@inherits System.Web.Mvc.WebViewPage
@model ...

Leave a Comment