void Application_Start(object sender, EventArgs e) { // Código que se ejecuta al iniciar la aplicación AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); RouteConfig.RegisterRoutes(RouteTable.Routes); HandlerConfig.RegisterHandlers(GlobalConfiguration.Configuration.MessageHandlers); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); HandlerConfig.RegisterHandlers(GlobalConfiguration.Configuration.MessageHandlers); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); HandlerConfig.RegisterHandlers(GlobalConfiguration.Configuration.MessageHandlers); GlobalConfiguration.Configuration.Filters.Add(new ExceptionHandlingAttribute()); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); AutofacConfig.RegisterAutoFac(); }
protected void Application_Start() { //AreaRegistration.RegisterAllAreas(); //GlobalConfiguration.Configure(WebApiConfig.Register); //FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); //RouteConfig.RegisterRoutes(RouteTable.Routes); //Http Client Protocol Settings System.Net.ServicePointManager.Expect100Continue = false; System.Net.ServicePointManager.MaxServicePointIdleTime = 60 * 60 * 1000;//60 Minutes ServicePointManager.DefaultConnectionLimit = 132; FileInfo fi = new FileInfo(System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath + "\\web.config"); log4net.Config.XmlConfigurator.ConfigureAndWatch(fi); Assembly assem = Assembly.GetExecutingAssembly(); AssemblyName assemName = assem.GetName(); AggieGlobalLogManager.Info("================================================================="); AggieGlobalLogManager.Info("Starting SKYSITE-Web-API-Service v{0}", assemName.Version); AggieGlobalLogManager.Info("================================================================="); AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); FilterConfig.RegisterHttpFilters(GlobalConfiguration.Configuration.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); FormatterConfig.RegisterFormatters(GlobalConfiguration.Configuration.Formatters); HandlerConfig.RegisterHandlers(GlobalConfiguration.Configuration.MessageHandlers); //Instnatiate the one & only instance of GlobalApp - facade design pattern to Provide an unified interface to a set of interfaces to deal with business functions if (_theGlobalApp == null) { string dbConnectionStringName = "AggieGlobalDB"; GlobalApp.Initialize(dbConnectionStringName); _theGlobalApp = GlobalApp.Instance; } }