title: Is the Global.Application_Start no longer used in Sitefinity 11.2?
body: <p>My <code>application_start</code> method in the Global.asax.cs file is never run. </p>
  
  <p>I can reproduce this in a stock Sitefinity site created using the 11.2 Project Manager. If I add a Global.asax.cs file to it using Visual Studio, the events I define are never run. </p>
  
  <p>Ultimately I'm just trying to register a custom configuration type in a project I'm upgrading to 11.2. </p>
  
  <p>After an upgrade from 9.2 to 11.2, the code in Global.asax.cs is no longer running. I can put simple logging code in the <code>Application_Start</code> method and it will never get called. I have tried using <code>Debugger.Break()</code>, I've tried manual breakpoints, I've tried IIS and IISExpress. None of them work.</p>
  
  <p>I think something in Sitefinity 11.2 hijacks the standard application startup, and therefore it never runs this pretty standard method, but I don't know why or how to circumvent this.</p>
  
  <p>I found this question asked many years ago: <a href="https://stackoverflow.com/questions/7160711/global-asax-not-firing-on-precompiled-sitefinity-project">Global.asax not firing on precompiled Sitefinity project</a>, but there is no answer. </p>
  
  <p>I tried what the two comments suggested, but they do not apply to me since this isn't a deployed site, it is in my development environment. </p>
  
  <p>Here is my Global.asax.cs:</p>
  
  <pre><code>using System;
  using System.IO;
  using System.Threading;
  using Telerik.Microsoft.Practices.Unity;
  using Telerik.Sitefinity.Abstractions;
  using Telerik.Sitefinity.Configuration;
  using SitefinityWebApp.Custom.Configuration;
  
  namespace SitefinityWebApp
  {
      public class Global : System.Web.HttpApplication
      {
  
          protected void Application_Start(object sender, EventArgs e)
          {
  
              throw new Exception("I told you this wouldn't run.");
  
              logStartUpCall(string.Concat("Application started at: ", DateTime.Now));
  
              Bootstrapper.Bootstrapped += Bootstrapper_Bootstrapped;
              Bootstrapper.Initialized += this.Bootstrapper_Initialized;
  
              //log call
              logStartUpCall(string.Concat("Call made to bootstrapper: ", DateTime.Now));
          }
  
  
          void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
          {
              //log call
              logStartUpCall(string.Concat("Bootstrapper_Initialized:", " ", DateTime.Now));
  
  
              if (e.CommandName == "Bootstrapped")
              {
                  ObjectFactory.Container.RegisterType&lt;Telerik.Sitefinity.Workflow.IWorkflowDefinitionResolver, Nccer.Sitefinity.CustomWorkflowDefinitionResolver&gt;();
  
                  System.Web.Mvc.RouteCollectionExtensions.MapRoute(System.Web.Routing.RouteTable.Routes,
                      "Classic",
                      "Redirect",
                      new { controller = "Redirect", action = "Index" });
  
                  Config.RegisterSection&lt;MercuryConfiguration&gt;();
              }
  
              //log call
              logStartUpCall(string.Concat("Bootstrapper Configuration &amp; Registration complete:", " ", DateTime.Now));
          }
  
          protected void Bootstrapper_Bootstrapped(object sender, EventArgs e)
          {
              logStartUpCall(string.Concat("Bootstrapper_Bootstrapped:", " ", DateTime.Now));
  
              Nccer.Sitefinity.FeatherActionInvokerCustom.Register();
  
              logStartUpCall(string.Concat("Bootstrapper_Bootstrapped finished:", " ", DateTime.Now));
          }
  
          protected void logStartUpCall(string message)
          {
  
              TextWriter tw = new StreamWriter(System.Web.Hosting.HostingEnvironment.MapPath("/App_Data/SiteFinity/Logs/Startup.log"), true);
  
              // write a line of text to the file
              tw.WriteLine(message);
  
              // close the stream
              tw.Close();
  
          }
      }
  }
  </code></pre>
  
  <p>I would expect the <code>application_start</code> method to be called, but it is not. The exception is not thrown, the logging is not done, the module is not registered. Its like it isn't even there.</p>
  
  <p>I've been working on this for the better part of the day and I'm at a loss.</p>