Web/Global.asax.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Routing;
using System.Timers;
using System.Data.Entity;
namespace Web
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
try
{
Kscor.Common.Config.Install = new Kscor.Common.Install().CheckConn();
}
catch (Exception)
{
Kscor.Common.Config.Install = false;
}
//Kscor.Common.Config.Install = true;
if (!Database.Exists(Kscor.Common.Config.KscorConn))
{
Database.SetInitializer<Kscor.DAL.KscorContext>(new Kscor.DAL.KscorInitializer());
}
if (Kscor.Common.Config.Install)
{
try
{
System.Timers.Timer myTimer = new System.Timers.Timer(60000);
myTimer.Elapsed += new ElapsedEventHandler(myTimer_Elapsed);
myTimer.Enabled = true;
myTimer.AutoReset = true;
new Kscor.BLL.Route().RegisterRoutes(RouteTable.Routes);
Kscor.Common.Log.SaveNote("Application", "Application Start!");
}
catch (Exception ex)
{
HttpRuntime.UnloadAppDomain();
Kscor.Common.Log.SaveException("Exception", ex);
System.Web.HttpContext.Current.Response.End();
}
}
else
{
new Kscor.BLL.Route().RegisterRoutes(RouteTable.Routes);
System.Web.HttpContext.Current.Response.Redirect("/kzcms/Install");
}
}
void myTimer_Elapsed(object source, ElapsedEventArgs e)
{
try
{
Kscor.BLL.Autotask.DoTask();
}
catch (Exception ee)
{
后面还有 46 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
