コード例 #1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            BundleConfig.RegisterBundles(BundleTable.Bundles);

            var formatters = GlobalConfiguration.Configuration.Formatters;

            formatters.Remove(formatters.XmlFormatter);

            var json = formatters.JsonFormatter;

            json.SerializerSettings.Formatting       = Formatting.Indented;
            json.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();

            AutomaperWebProfile.Run();

            GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(110);
            GlobalHost.Configuration.DisconnectTimeout = TimeSpan.FromSeconds(30);
            GlobalHost.Configuration.KeepAlive         = TimeSpan.FromSeconds(10);

            ModelBinders.Binders.Add(typeof(DateTime), new DateTimeModelBinder());
            ModelBinders.Binders.Add(typeof(DateTime?), new DateTimeModelBinder());

            JobSheduler.Start();
        }
コード例 #2
0
ファイル: Global.asax.cs プロジェクト: FazurP/DigitalCv
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     UnityConfig.RegisterComponents();
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     AutomaperWebProfile.Run();
     //System.Web.Optimization.BundleTable.EnableOptimizations = true;
 }
コード例 #3
0
 protected void Application_Start()
 {
     Log.Info("Starting up...");
     AreaRegistration.RegisterAllAreas();
     UnityConfig.RegisterComponents();
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     AutomaperWebProfile.Run();
     System.Web.Optimization.BundleTable.EnableOptimizations = true;
     Log.Info("Routes and bundles registered");
     Log.Info("Started");
 }
コード例 #4
0
 protected void Application_Start()
 {
     Log.Info("Starting up...");
     AreaRegistration.RegisterAllAreas();
     UnityConfig.RegisterComponents();
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     AutomaperWebProfile.Run();
     System.Web.Optimization.BundleTable.EnableOptimizations        = true;
     System.Web.Helpers.AntiForgeryConfig.UniqueClaimTypeIdentifier =
         System.Security.Claims.ClaimTypes.NameIdentifier;
     Log.Info("Routes and bundles registered");
     Log.Info("Started");
 }