protected void Application_Start() { DevExtremeBundleConfig.RegisterBundles(BundleTable.Bundles); AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); DevExtremeBundleConfig.RegisterBundles(BundleTable.Bundles); ModelBinders.Binders.DefaultBinder = new DevExpressEditorsBinder(); }
protected void Application_Start() { DashboardConfig.RegisterService(RouteTable.Routes); DevExtremeBundleConfig.RegisterBundles(BundleTable.Bundles); AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); ModelBinders.Binders.Add(typeof(DateTime), new CustomDateModelBinder()); }
protected void Application_Start() { DevExtremeBundleConfig.RegisterBundles(BundleTable.Bundles); FontAwesomeBundleConfig.RegisterBundles(); OnStart(); //illi 25.12.1012 Logger4SendingEMail.InitLogger(); //IoC.Resolve<ICurrentLanguage>().Set("EN"); ModelBinders.Binders.DefaultBinder = new DevExpress.Web.Mvc.DevExpressEditorsBinder(); //Database.SetInitializer<FoxSecDBContext>(new DropCreateDatabaseIfModelChanges<FoxSecDBContext>()); Database.SetInitializer <FoxSecDBContext>(null); GetSerFlashDisk(); if (string.IsNullOrEmpty(flashlicstatus)) { GetSerHardDisk(); if (string.IsNullOrEmpty(hardlicstatus)) { CreateLicFile(); } } else { string strpath = Path.Combine(flashdrive + @"\FoxSecLicense.ini"); con.Open(); SqlCommand cmd = new SqlCommand("select id from classificatorvalues where Value='Licence Path'", con); int? tc = Convert.ToInt32(cmd.ExecuteScalar()); if (tc != null && tc > 0) { SqlCommand cmdi = new SqlCommand("update ClassificatorValues set Comments='" + strpath + "' where id='" + tc + "'", con); cmdi.ExecuteNonQuery(); } con.Close(); } try { con.Open(); SqlCommand cmd = new SqlCommand("select count(*) from Classificators where Description='T&A report main company name'", con); int tc = Convert.ToInt32(cmd.ExecuteScalar()); if (tc == 0) { SqlCommand cmd1 = new SqlCommand("insert into Classificators(Description)values('T&A report main company name')", con); cmd1.ExecuteNonQuery(); SqlCommand cmd2 = new SqlCommand("select id from Classificators where Description = 'T&A report main company name'", con); string id = Convert.ToString(cmd2.ExecuteScalar()); SqlCommand cmd3 = new SqlCommand("insert into ClassificatorValues(ClassificatorId,Value,SortOrder)values('" + id + "','FoxSec',0)", con); cmd3.ExecuteNonQuery(); } con.Close(); } catch { } }
protected void Application_Start() { DevExtremeBundleConfig.RegisterBundles(BundleTable.Bundles); AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings .ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; GlobalConfiguration.Configuration.Formatters .Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); GlobalConfiguration.Configure(WebApiConfig.Register); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); DevExtremeBundleConfig.RegisterBundles(BundleTable.Bundles); ModelBinders.Binders.DefaultBinder = new DevExpress.Web.Mvc.DevExpressEditorsBinder(); DevExpress.Web.ASPxWebControl.CallbackError += Application_Error; #region Before grid /* * AreaRegistration.RegisterAllAreas(); * GlobalConfiguration.Configure(WebApiConfig.Register); * FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); * RouteConfig.RegisterRoutes(RouteTable.Routes); * ModelBinders.Binders.DefaultBinder = new DevExpress.Web.Mvc.DevExpressEditorsBinder(); * DevExpress.Web.ASPxWebControl.CallbackError += Application_Error; */ #endregion }
protected void Application_Start() { MvcHandler.DisableMvcResponseHeader = true; DevExtremeBundleConfig.RegisterBundles(BundleTable.Bundles); DevExpress.Data.Helpers.ServerModeCore.DefaultForceCaseInsensitiveForAnySource = true; DevExpress.XtraReports.Web.ASPxReportDesigner.StaticInitialize(); //Elmah for Web API errors logging GlobalConfiguration.Configuration.Filters.Add(new ElmahHandleErrorApiAttribute()); // Custom Filter / Attribute to override action execution methods //GlobalFilters.Filters.Add(new LogAttribute()); if (GaneStaticAppExtensions.MiniProfilerEnabled) { // mini profiler MiniProfilerEF6.Initialize(); } GlobalFilters.Filters.Add(new StackExchange.Profiling.Mvc.ProfilingActionFilter()); // remove unnecessary view engines ViewEngines.Engines.Clear(); IViewEngine razorEngine = new RazorViewEngine() { FileExtensions = new string[] { "cshtml" } }; ViewEngines.Engines.Add(razorEngine); AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); //custom Json date formatter JsonMediaTypeFormatter jsonFormatter = GlobalConfiguration.Configuration.Formatters.JsonFormatter; JsonSerializerSettings jSettings = new Newtonsoft.Json.JsonSerializerSettings() { //Formatting = Formatting.Indented, DateTimeZoneHandling = DateTimeZoneHandling.Utc //NullValueHandling = NullValueHandling.Ignore }; jSettings.Converters.Add(new MyDateTimeConvertor()); jsonFormatter.SerializerSettings = jSettings; ModelBinders.Binders.DefaultBinder = new DevExpressEditorsBinder(); // Custom Localizer for Dev Express Scheduler CustomASPxSchedulerLocalizer.Activate(); AutoMapperBootStrapper.RegisterMappings(); MiniProfiler.Configure(new MiniProfilerOptions { // Sets up the route to use for MiniProfiler resources: // Here, ~/profiler is used for things like /profiler/mini-profiler-includes.js RouteBasePath = "~/profiler", // Example of using SQLite storage instead //Storage = new SqliteMiniProfilerStorage(ConnectionString), // Different RDBMS have different ways of declaring sql parameters - SQLite can understand inline sql parameters just fine. // By default, sql parameters will be displayed. //SqlFormatter = new StackExchange.Profiling.SqlFormatters.InlineFormatter(), // These settings are optional and all have defaults, any matching setting specified in .RenderIncludes() will // override the application-wide defaults specified here, for example if you had both: // PopupRenderPosition = RenderPosition.Right; // and in the page: // @MiniProfiler.Current.RenderIncludes(position: RenderPosition.Left) // ...then the position would be on the left on that page, and on the right (the application default) for anywhere that doesn't // specified position in the .RenderIncludes() call. PopupRenderPosition = RenderPosition.Right, // defaults to left PopupMaxTracesToShow = 10, // defaults to 15 // ResultsAuthorize (optional - open to all by default): // because profiler results can contain sensitive data (e.g. sql queries with parameter values displayed), we // can define a function that will authorize clients to see the JSON or full page results. // we use it on http://stackoverflow.com to check that the request cookies belong to a valid developer. ResultsAuthorize = request => request.IsLocal, // ResultsListAuthorize (optional - open to all by default) // the list of all sessions in the store is restricted by default, you must return true to allow it ResultsListAuthorize = request => { // you may implement this if you need to restrict visibility of profiling lists on a per request basis return(true); // all requests are legit in this example }, // Stack trace settings StackMaxLength = 256, // default is 120 characters // (Optional) You can disable "Connection Open()", "Connection Close()" (and async variant) tracking. // (defaults to true, and connection opening/closing is tracked) TrackConnectionOpenClose = true } // Optional settings to control the stack trace output in the details pane, examples: .ExcludeType("SessionFactory") // Ignore any class with the name of SessionFactory) .ExcludeAssembly("NHibernate") // Ignore any assembly named NHibernate .ExcludeMethod("Flush") // Ignore any method with the name of Flush .AddViewProfiling() // Add MVC view profiling (you want this) // If using EntityFrameworkCore, here's where it'd go. // .AddEntityFramework() // Extension method in the MiniProfiler.EntityFrameworkCore package ); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); DevExtremeBundleConfig.RegisterBundles(BundleTable.Bundles); }