Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

56 linhas
1.8 KiB

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