Esempio n. 1
0
        protected void Application_Start()
        {
            RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            RouteTable.Routes.IgnoreRoute("Areas/");

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            //RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes);
            AreaRegistrationOrder.RegisterAllAreasOrder();
            BundleConfig.RegisterBundles(BundleTable.Bundles);



            RegistAtStart.RegistStrategies();
            ObjectContainer.ApplicationStart(new AutoFacContainer());
            RegistAtStart.RegistPlugins();
            //OnHimallStartMethodAttribute.Start();
            MemberApplication.InitMessageQueue();

            //delete-pengjiangxiong
            //App_Code.Common.LimitOrderHelper.InitLimitOrder();
            //autoFac();
            //  ViewEngines.Engines.Insert(0, new TemplateVisualizationViewEngine());

            ModelValidatorProviders.Providers.Add(new FluentValidationModelValidatorProvider(new CustomValidatorFactory()));
            DataAnnotationsModelValidatorProvider.AddImplicitRequiredAttributeForValueTypes = false;
        }
Esempio n. 2
0
 void Application_Start(object sender, EventArgs e)
 {
     RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
     RegistAtStart.Regist();
     Job.Start();
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     GlobalConfiguration.Configure(new Action <HttpConfiguration>(WebApiConfig.Register));
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     AreaRegistrationOrder.RegisterAllAreasOrder();
     BundleConfig.RegisterBundles(BundleTable.Bundles);
 }
 protected void Application_Start()
 {
     RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
     GlobalConfiguration.Configure(WebApiConfig.Register);
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     AreaRegistrationOrder.RegisterAllAreasOrder();
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     XmlConfigurator.Configure();
     //定时任务
     //JobScheduler.Start();
     //简单机器码
     JeasuHelper.ThisMachineCode = Common.SecureHelper.MD5(MachineCode.GetMachineCodeString());
 }