title: ASP.NET MVC Error: Page is not allowed here because it does not extend class 'System.Web.Page'
body: <p>I have a new ASP.NET MVC project (my first), and I had been running fine with 1 controller, view, and model. After I added a new controller and view, my first view started throwing this error message when I try to run the project:</p>
  
  <p>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. </p>
  
  <pre><code>Parser Error Message: 'PeopleManagement.Web.Views.Search.Search' is not allowed here because it does not extend class 'System.Web.UI.Page'.
  
  Source Error: 
  
  
  Line 1:  &lt;%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Master.Master" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="PeopleManagement.Web.Views.Search.Search" %&gt;
  Line 2:  &lt;asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"&gt;
  Line 3:  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>This is the entire contents of my Code Behind for that aspx page:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  
  
  namespace PeopleManagement.Web.Views.Search
  {
      public partial class Search : ViewPage
      {
      }
  }
  </code></pre>
  
  <p>I'm not sure what changed in my app that is causing this. It seems like VS might be reading this as a webforms app instead of an MVC app maybe? Any ideas on where I should start to troubleshoot? </p>