The view must derive from WebViewPage


When designing a website for my friend from scratch, everything has gone well. One day I renamed this project to GeekWrite thereafter I am not able to run this website.I have faced below exception in my application (I don’t know what I did wrong)


I have been searching for a solution to this problem around 2 hours and I found the below article addressing this issue

http://blogs.msdn.com/b/gaurav/archive/2014/01/15/the-view-must-derive-from-webviewpage-or-webviewpage-lt-tmodel-gt-the-view-at-views-home-index-cshtml-must-derive-from-webviewpage-or-webviewpage-lt-tmodel-gt.aspx

Solution 1 and 2 didn’t work for me. After I have searched long to solve this problem I have found the where I did mistake.


Where did I make a mistake?

Even I have the web.config file in view folder but it located inside the specific folder i.e. it located inside the Shared folder instead of parent Views folder as shown in the image below.


So I have moved this web.config file to parent Views folder. Now issue has been fixed!!! Happy Coding!!!
The view must derive from WebViewPage The view must derive from WebViewPage Reviewed by Unknown on 12 March, 2016 Rating: 5

No comments:

Powered by Blogger.