aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Web/TangoWebApplication.cs
blob: 1f98d0a39e900cb017e7eb29983d5fef4d5bb6f9 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.Http;
using System.Web.Http.Filters;
using System.Web.Mvc;
using Tango.Logging;
using Tango.Web.Logging;

namespace Tango.Web
{
    public class TangoWebApplication : HttpApplication
    {
        //Create filter
        public class LogExceptionFilterAttribute : ExceptionFilterAttribute
        {
            public override void OnException(HttpActionExecutedContext context)
            {
                LogManager.Default.Log(context.Exception);
            }
        }

        protected virtual void Application_Start()
        {
            LogManager.Default.Categories.Add(LogCategory.Debug);
            LogManager.Default.RegisterLogger(new AzureCloudLogger());
            GlobalConfiguration.Configuration.Filters.Add(new LogExceptionFilterAttribute());

            LogManager.Default.Log("Application Started!");
        }

        protected void Application_Error(object sender, EventArgs e)
        {
            Exception exception = Server.GetLastError();
            if (exception != null)
            {
                LogManager.Default.Log(exception, "Global Exception!");
            }
        }
    }
}
class="k">background: #68217a; position:relative; } #hangcloud { width: 190px; height: 160px; background: url("../images/bannerart03.png"); position: absolute; top: 0; right: -30px; } h1, h2 { font-family: "Segoe UI Light", "Segoe UI", Helvetica, Arial, sans-serif; line-height: 1; margin: 0 18px; padding: 0; } #header h1 { font-size: 3.4em; padding-top: 18px; font-weight: normal; margin-left: 15px; } #header h2 { font-size: 1.5em; margin-top: 10px; padding-bottom: 18px; font-weight: normal; } #main_content { width: 100%; display: flex; flex-direction: row; } h1, h2, h3, h4, h5, h6 { font-weight: bolder; } #main_content h1 { font-size: 1.8em; margin-top: 34px; } #main_content h1:first-child { margin-top: 30px; } #main_content h2 { font-size: 1.4em; font-weight: bold; } p, ul { margin: 11px 18px; } #main_content a { color: #06C; text-decoration: none; } ul { margin-top: 13px; margin-left: 18px; padding-left: 0; } ul li { margin-left: 18px; padding-left: 0; } #lpanel { width: 620px; float: left; } #rpanel ul { list-style-type: none; width: 300px; } #rpanel ul li { line-height: 1.8em; } #rpanel { background: #e7e7e7; width: 360px; float: right; } #rpanel div { width: 300px; }