/
Global.asax.cs
28 lines (22 loc) · 1.11 KB
/
Global.asax.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using DevExpress.DashboardWeb;
using System;
using System.Configuration;
namespace DXWebApplication21 {
public class Global_asax : System.Web.HttpApplication {
void Application_Start(object sender, EventArgs e) {
System.Web.Routing.RouteTable.Routes.MapPageRoute("defaultRoute", "", "~/Default.aspx");
DevExpress.Web.ASPxWebControl.CallbackError += new EventHandler(Application_Error);
ASPxDashboard.StaticInitialize();
DashboardConfigurator.Default.SetConnectionStringsProvider(
new ConnectionStringsStorage(ConfigurationManager.ConnectionStrings["ConnectionsStorage"].ConnectionString));
DashboardFileStorage dashboardFileStorage = new DashboardFileStorage("~/App_Data/Dashboards");
DashboardConfigurator.Default.SetDashboardStorage(dashboardFileStorage);
}
void Application_End(object sender, EventArgs e) {
// Code that runs on application shutdown
}
void Application_Error(object sender, EventArgs e) {
// Code that runs when an unhandled error occurs
}
}
}