Beispiel #1
0
        /// <summary>
        /// Application Start
        /// </summary>
        protected void Application_Start()
        {
            log4net.Config.XmlConfigurator.Configure();
            LogService.Instance.SetApplicationVariables(DomainApplicationService.Instance.MachineName, DomainApplicationService.Instance.ApplicationCode);

            LogService.Instance.Log.InfoFormat("Global.asax Application_Start() Called.");

            DomainApplicationService.Instance.IOCContainer = new ClientBootstrapper().Run();

            GlobalConfiguration.Configure(WebApiConfig.Register);
            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            EntityConfig.Register();
            CacheConfig.PreloadItems();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            ModelBinderConfig.Register();

            //
            //If you want to ignore the certificate check when requesting an https resource, uncomment the following code.
            //This is useful if your app connects uses https/ssl resources which dont have a cert issued by a valid
            //signing authority.
            //This should probably never be uncommented in a production app though. Its here for reference in case its needed.
            //
            //ServicePointManager.ServerCertificateValidationCallback = delegate
            //{
            //    return true;
            //};
        }