markus / MarkusLogview / MARKUS_LOGVIEW / Global.asax.cs @ 84578b97
이력 | 보기 | 이력해설 | 다운로드 (1.94 KB)
1 |
using MARKUS_LOGVIEW.Controllers; |
---|---|
2 |
using MARKUS_LOGVIEW.Models; |
3 |
using MarkusDataModel.Common; |
4 |
using MarkusDataModel.DataModel; |
5 |
using Microsoft.AspNet.SignalR; |
6 |
using System; |
7 |
using System.Collections.Generic; |
8 |
using System.Linq; |
9 |
using System.Web; |
10 |
using System.Web.Http; |
11 |
using System.Web.Mvc; |
12 |
using System.Web.Optimization; |
13 |
using System.Web.Routing; |
14 |
using System.Web.SessionState; |
15 |
using TableDependency.SqlClient; |
16 |
|
17 |
namespace MARKUS_LOGVIEW |
18 |
{ |
19 |
public class WebApiApplication : System.Web.HttpApplication |
20 |
{ |
21 |
|
22 |
protected void Application_Start() |
23 |
{ |
24 |
AreaRegistration.RegisterAllAreas(); |
25 |
GlobalConfiguration.Configure(WebApiConfig.Register); |
26 |
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); |
27 |
RouteConfig.RegisterRoutes(RouteTable.Routes); |
28 |
BundleConfig.RegisterBundles(BundleTable.Bundles); |
29 |
|
30 |
//// Make long polling connections wait a maximum of 110 seconds for a |
31 |
//// response. When that time expires, trigger a timeout command and |
32 |
//// make the client reconnect. |
33 |
//GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(110); |
34 |
|
35 |
//// Wait a maximum of 30 seconds after a transport connection is lost |
36 |
//// before raising the Disconnected event to terminate the SignalR connection. |
37 |
//GlobalHost.Configuration.DisconnectTimeout = TimeSpan.FromSeconds(30); |
38 |
|
39 |
//// For transports other than long polling, send a keepalive packet every |
40 |
//// 10 seconds. |
41 |
//// This value must be no more than 1/3 of the DisconnectTimeout value. |
42 |
//GlobalHost.Configuration.KeepAlive = TimeSpan.FromSeconds(10); |
43 |
|
44 |
} |
45 |
|
46 |
protected void Application_BeginRequest() |
47 |
{ |
48 |
Response.Cache.SetCacheability(HttpCacheability.NoCache); |
49 |
Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1)); |
50 |
Response.Cache.SetNoStore(); |
51 |
} |
52 |
|
53 |
} |
54 |
} |