Could not load type 'System.Web.Mvc.ViewPage'

I know that many questions have already been asked on this topic and they all answered. But even though I try to fulfill the answer in my case, it turns out to be useless.

I am trying to develop an MVC application without using a template. I created a simple web application and then added folders following the MVC pattern. I have a controller, model and view for a controller.

In the view, I have the following line on my first line

<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MVCWithoutTemplate.Models.User>"  %>

      

When I try to run it I am getting error like -

Description . An error occurred while parsing a resource required to service this request. Please review the following specific error data and modify the original file accordingly.

Parser error message . Could not load type 'System.Web.Mvc.ViewPage'.

I tried the solution I found on various sites. It looks like this:

http://www.codewrecks.com/blog/index.php/2009/04/05/could-not-load-type-systemwebmvcviewpage/

It still gives the same error.

Can anyone tell me why?

+3


source to share


2 answers


Oh, I got it! I need to update both web configurators! One of all projects and also one in the Preview folder. I haven't updated all of the projects web config! Poorly!



+6


source


I had the same problem. It turned out that I had updated the System.Web.Mvc dll but forgot to set the "copy local" flag to true. Going true fixed that for me.



+1


source







All Articles