title: ASP.NET Master page not loading
body: <p>I have a site that is giving me the following error:</p>
  
  <blockquote>
    <p>Content controls are allowed only in content page that references a
    master page.</p>
  </blockquote>
  
  <p>Here is the contents of the file it is trying to load:</p>
  
  <pre><code>&lt;%@ Page Language="c#" MasterPageFile="~/shared/templates/Default.master" %&gt;
  &lt;asp:Content ID="PageContent" runat="server" ContentPlaceHolderID="PageContentPlaceHolder" /&gt;
  </code></pre>
  
  <p>Default.master does exist in the location requested and does contain:</p>
  
  <pre><code>&lt;asp:ContentPlaceHolder runat="Server" ID="PageContentPlaceHolder" /&gt;
  </code></pre>
  
  <p>Why is the child page not recognizing/loading the master page?</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p>UPDATE - Here is the stack trace and .NET Version info:</p>
  
  <pre><code>[HttpException (0x80004005): Content controls are allowed only in content page that references a master page.]
     System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +11119902
     System.Web.UI.Page.get_Master() +69
     System.Web.UI.Page.ApplyMasterPage() +18
     System.Web.UI.Page.PerformPreInit() +58
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1256
  </code></pre>
  
  <blockquote>
    <p>Version Information: Microsoft .NET Framework Version:2.0.50727.5485;
    ASP.NET Version:2.0.50727.5483</p>
  </blockquote>