void Application_Start(object sender, EventArgs e) { // Code that runs on application startup var assemblies = BuildManager.GetReferencedAssemblies().Cast <Assembly>().ToArray(); webapp = new WebApp(); // setup up dependency injection container var wcc = webapp.GetConfiguration(); wcc.Context.EnablePropertyInjection(); wcc.RegisterAllTypes(); // setup web dependency injection webapp.Bootstrap(assemblies); if (Configuration.Current.Production) { Application["AppServer"] = $"http://{Environment.MachineName}.eecs.umich.edu/"; } else { Application["AppServer"] = "/"; } }
protected void Application_Start(object sender, EventArgs e) { WebApp = new WebApp(); // setup up dependency injection container WebApp.Context.EnablePropertyInjection(); var wcc = new WebContainerConfiguration(WebApp.Context); wcc.RegisterAllTypes(); // setup web dependency injection Assembly[] assemblies = BuildManager.GetReferencedAssemblies().Cast <Assembly>().ToArray(); WebApp.Bootstrap(assemblies); if (ServiceProvider.Current.IsProduction()) { Application["AppServer"] = "http://" + Environment.MachineName + ".eecs.umich.edu/"; } }