title: Web.Config Runtime Error, Server Error in '/' Application
body: <p>I'm trying to create a very simple asp.net masterpage site, all is going well until I upload to host. With the following web.config </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!--
  For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433
  --&gt;
  &lt;configuration&gt;
  &lt;system.web&gt;
  &lt;compilation debug="true" targetFramework="4.5" /&gt;
  &lt;httpRuntime targetFramework="4.5" /&gt;
  &lt;/system.web&gt;
  &lt;/configuration&gt; 
  </code></pre>
  
  <p>I'm told to add </p>
  
  <pre><code>&lt;customErrors mode="Off"/&gt;  
  </code></pre>
  
  <p>When I do add that</p>
  
  <pre><code>&lt;system.web&gt;
    &lt;compilation debug="true" targetFramework="4.5" /&gt;
    &lt;httpRuntime targetFramework="4.5" /&gt;
    &lt;customErrors mode="Off"/&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>I get new error </p>
  
  <p>Cannot find ContentPlaceHolder 'ContentPlaceHolder1' in the master page '/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.</p>
  
  <p>Masterpage code seems to be correct</p>
  
  <pre><code>&lt;%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
  &lt;title&gt;test_configprob02&lt;/title&gt;&lt;/head&gt;
  &lt;body&gt;
  &lt;form id="mainForm" runat="server"&gt;
  
      &lt;asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"&gt;
  
      &lt;/asp:ContentPlaceHolder&gt;
  
  &lt;/form&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>default.aspx code </p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"&gt;
  &lt;p&gt;Lorem ipsum dolor  ipsum.&lt;/p&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Stumped.</p>
  
  <p>Here's what shows in the browser-</p>
  
  <p>Server Error in '/' Application.</p>
  
  <pre><code>Cannot find ContentPlaceHolder 'bodyPL' in the master page '/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.
  </code></pre>
  
  <p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p>
  
  <pre><code>Exception Details: System.Web.HttpException: Cannot find ContentPlaceHolder 'bodyPL' in the master page '/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.
  </code></pre>
  
  <p>Source Error: </p>
  
  <p>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</p>
  
  <p>Stack Trace: </p>
  
  <pre><code>[HttpException (0x80004005): Cannot find ContentPlaceHolder 'bodyPL' in the master page '/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.]
     System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +797
     System.Web.UI.Page.get_Master() +54
     System.Web.UI.Page.ApplyMasterPage() +14
     System.Web.UI.Page.PerformPreInit() +45
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +335
  </code></pre>
  
  <p>Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249</p>