title: Deploying ASP.NET 4.0 website on IIS 7.0
body: <p>I've deployed ASP.net site on IIS and crashing into an null reference exception. It runs fine ASP.net development server but fails to load on the IIS. </p>
  
  <p>I have tried reinstalling the IIS and even aspnet_regiis as well. But the error remains. Please find the error below.</p>
  
  <h2>Server Error in '/' Application.</h2>
  
  <p>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.]
     _Default.Page_Load(Object sender, EventArgs e) +183
     System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
     System.Web.UI.Control.LoadRecursive() +70
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean  includeStagesAfterAsyncPoint) +3047
  </code></pre>
  
  <hr>
  
  <p>Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 </p>