1

I have implemented an architecture in MVC in which I created two projects:
1_Presentation layer
2_Controller layer

I have implemented my own controller factory. The overall logic is perfectly working in MVC4. But as I implement the same architecture in MVC5 I get the following error.

The view at '~/Views/Home/Index.cshtml' must derive from WebViewPage, or WebViewPage<TModel>.

I have searched for this error and applied the possible solution but still getting the same issue.

I applied this solution The view must derive from WebViewPage, or WebViewPage<TModel> but unable to solve my problem.

Community
  • 1
  • 1
Hassam Salam
  • 246
  • 3
  • 13
  • without code, we cannot give you an answer. show us your code. we cannot read minds – Ahmed ilyas Mar 24 '15 at 19:32
  • Global.asax file of Presentation project: – Hassam Salam Mar 24 '15 at 19:34
  • possible duplicate of [The view must derive from WebViewPage, or WebViewPage.](http://stackoverflow.com/questions/8127462/the-view-must-derive-from-webviewpage-or-webviewpagetmodel) – GSerg Mar 24 '15 at 19:35
  • public class MvcApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection routes) { RoutingManager.RegisterDefaultRoutesPortal(routes); ControllerBuilder.Current.SetControllerFactory(new MFPortalControllerFactory()); } protected void Application_Start() { AreaRegistration.RegisterAllAreas(); // RouteConfig.RegisterRoutes(RouteTable.Routes); RegisterRoutes(RouteTable.Routes); }} – Hassam Salam Mar 24 '15 at 19:36
  • possible duplicate of [“.. must derive from WebViewPage, or WebViewPage” on MonoDevelop & MVC3 (OS X)](http://stackoverflow.com/q/12971511/11683) – GSerg Mar 24 '15 at 19:36
  • Applied the solution of this link but it's not solving my problem GSerg – Hassam Salam Mar 24 '15 at 19:50

0 Answers0