25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.7 KiB

  1. using Learun.Cache.Base;
  2. using Learun.Cache.Factory;
  3. using LicenseHelper1;
  4. using System;
  5. using System.Configuration;
  6. using System.Web;
  7. using System.Web.Mvc;
  8. using System.Web.Routing;
  9. using Hangfire;
  10. using Learun.Application.WorkFlow;
  11. namespace Learun.Application.Web
  12. {
  13. /// <summary>
  14. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  15. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  16. /// 创建人:陈彬彬
  17. /// 日 期:2017.03.08
  18. /// 描 述:应用程序全局设置
  19. /// </summary>
  20. public class MvcApplication : HttpApplication
  21. {
  22. /// <summary>
  23. /// 启动应用程序
  24. /// </summary>
  25. protected void Application_Start()
  26. {
  27. AreaRegistration.RegisterAllAreas();
  28. FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
  29. RouteConfig.RegisterRoutes(RouteTable.Routes);
  30. Hangfire.GlobalConfiguration.Configuration.UseSqlServerStorage(ConfigurationManager.ConnectionStrings["hangfireString"].ConnectionString);
  31. // 启动的时候清除全部缓存
  32. //ICache cache = CacheFactory.CaChe();
  33. //cache.RemoveAll(0);
  34. //cache.RemoveAll(1);
  35. //cache.RemoveAll(2);
  36. //cache.RemoveAll(5);
  37. //cache.RemoveAll(6);
  38. WfJobScheduler.Start();
  39. ModifyInMemory_Spire.ActivateMemoryPatching();
  40. }
  41. /// <summary>
  42. /// 应用程序错误处理
  43. /// </summary>
  44. /// <param name="sender">sender</param>
  45. /// <param name="e">EventArgs</param>
  46. protected void Application_Error(object sender, EventArgs e)
  47. {
  48. var lastError = Server.GetLastError();
  49. }
  50. }
  51. }