title: ASP.NET configuration error while rendering the controls on Production server
body: <p>I am hosting a asp.net website on production server.</p>
  
  <p>I am grtting asp.net error in rendering the controls on production server.</p>
  
  <p>The stack trace of this error is :</p>
  
  <p>Server Error in '/' Application.
  Object reference not set to an instance of an object.
  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.NullReferenceException: Object reference not set to an instance of an object.
  </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>[NullReferenceException: Object reference not set to an instance of an object.]
     ASP.tribute_home_aspx.__RenderYTAnnouncement(HtmlTextWriter __w, Control parameterContainer) +44
     System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
     System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
     System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
     System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
     ASP.tribute_home_aspx.__RenderForm1(HtmlTextWriter __w, Control parameterContainer) +62
     System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
     System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
     System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +163
     System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
     System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
     System.Web.UI.Adapters.ControlAdapter.Render(HtmlTextWriter writer) +21
     FormRewriterControlAdapter.Render(HtmlTextWriter writer) +39
     System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +8685321
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
     System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
     ASP.tribute_home_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) +851
     System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
     System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
     System.Web.UI.Page.Render(HtmlTextWriter writer) +29
     System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266
  </code></pre>
  
  <p>I have tested my code fully but i could not find any error because the same code is working fine on the staging server.</p>
  
  <p>I feel this is an error releated the Virtual directory configuration or asp.net configuration on Production server.</p>
  
  <p>Please help to get rid off from this error as it has wested a lots of time already.</p>
  
  <p>Prior Thanks,</p>