de2339c68d07bc9d6e7538258844374ef3fa1ca7.svn-base 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using iBemsDataService.Controllers.Fms.WorkManagement.ScheduledTask;
  2. using iBemsDataService.Controllers.Bems.ScheduledTask;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Web;
  7. using System.Web.Http;
  8. using System.Web.Security;
  9. using System.Web.SessionState;
  10. using WebODataDataService;
  11. namespace iBemsDataService
  12. {
  13. public class Global : System.Web.HttpApplication
  14. {
  15. protected void Application_Start()
  16. {
  17. //GlobalConfiguration.Configuration.Formatters.Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter);
  18. //GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
  19. GlobalConfiguration.Configure( WebApiConfig.Register );
  20. //2016 02 29 hcLee
  21. //GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
  22. //GlobalConfiguration.Configuration.Formatters.Remove( GlobalConfiguration.Configuration.Formatters.XmlFormatter );
  23. // TODO : 아래는 서비스 시작시 작업 스케줄러 강제 실행 코드
  24. // TODO : Production 에서는 아래 코드 삭제 할 것
  25. WorkExecutionPlanJob tempJob = new WorkExecutionPlanJob();
  26. tempJob.Execute(null);
  27. FmsWorkManagementJobScheduler.Start();
  28. BemsScheduler.Start();
  29. //ControlBems cb = new ControlBems();
  30. //cb.Execute(null);
  31. }
  32. protected void Application_BeginRequest( object sender , EventArgs e )
  33. {
  34. iBemsDataService.CorsSupport.HandlePreflightRequest( HttpContext.Current );
  35. }
  36. }
  37. }