-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGlobal.asax.cs
40 lines (33 loc) · 1.1 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
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace MyAppUtils
{
// Nota: para obtener instrucciones sobre cómo habilitar el modo clásico de IIS6 o IIS7,
// visite http://go.microsoft.com/?LinkId=9394801
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapRoute(
"Default", //
"{controller}/{action}"
);
}
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
//Add Custom xmlValueProvider
ValueProviderFactories.Factories.Add(new XmlValueProviderFactory());
}
}
}