using System; using System.Web; using System.Web.Http; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using LeaRun.Application.Web.Common; using LeaRun.Util; namespace LeaRun.Application.Web { /// /// 应用程序全局设置 /// public class MvcApplication : HttpApplication { /// /// 启动应用程序 /// protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleTable.EnableOptimizations = true; BundleConfig.RegisterBundles(BundleTable.Bundles); //SMSServiecs.StartSMSSend(true); //NBCommon.NBLogin(); //NBHistoryJobRunning.JobRunning(); } /// /// 应用程序错误处理 /// protected void Application_Error(object sender, EventArgs e) { var lastError = Server.GetLastError(); } protected void Application_End() { NBHistoryJobRunning.JobEndding(); } } }