Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I know there are already many questions asked on this topic and they all have answered. But even though I am trying to implement the answer in my case, it is turning out to be futile.

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

In View, I have the following as my first line

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

When I am trying to run it, I am getting error as -

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'System.Web.Mvc.ViewPage'.

I tried for the solution i found on various sites. It is as follows -

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

It is still giving same error.

Can anyone tell me why?

like image 709
Dhanashree Avatar asked Aug 22 '14 06:08

Dhanashree


2 Answers

Oh I got it! I need to update both Web Configs! The one of the entire projects and also the one in the View folder. I had not updated entire projects web config! My Bad!

like image 138
Dhanashree Avatar answered Nov 19 '22 08:11

Dhanashree


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

like image 43
t_warsop Avatar answered Nov 19 '22 08:11

t_warsop