annotate Agendas/trunk/src/Agendas.Web/Global.asax.cs @ 49:be7a9720fb96

Diagramas
author nelopauselli
date Fri, 13 May 2011 22:59:00 -0300
parents 475be11edf56
children 3ebe89c88caa
rev   line source
34
475be11edf56 Ajuste en los nombre de los assemblies y namespaces
nelo@MTEySS.neluz.int
parents: 19
diff changeset
1 using System.Web.Mvc;
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
2 using System.Web.Routing;
34
475be11edf56 Ajuste en los nombre de los assemblies y namespaces
nelo@MTEySS.neluz.int
parents: 19
diff changeset
3 using AltNetHispano.Agendas.Factories;
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
4
34
475be11edf56 Ajuste en los nombre de los assemblies y namespaces
nelo@MTEySS.neluz.int
parents: 19
diff changeset
5 namespace AltNetHispano.Agendas.Web
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
6 {
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
7 // Note: For instructions on enabling IIS6 or IIS7 classic mode,
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
8 // visit http://go.microsoft.com/?LinkId=9394801
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
9
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
10 public class MvcApplication : System.Web.HttpApplication
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
11 {
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
12 public static void RegisterGlobalFilters(GlobalFilterCollection filters)
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
13 {
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
14 filters.Add(new HandleErrorAttribute());
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
15 }
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
16
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
17 public static void RegisterRoutes(RouteCollection routes)
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
18 {
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
19 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
20
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
21 routes.MapRoute(
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
22 "Default", // Route name
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
23 "{controller}/{action}/{id}", // URL with parameters
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
24 new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
25 );
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
26
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
27 }
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
28
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
29 protected void Application_Start()
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
30 {
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
31 AreaRegistration.RegisterAllAreas();
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
32
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
33 RegisterGlobalFilters(GlobalFilters.Filters);
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
34 RegisterRoutes(RouteTable.Routes);
19
74eb4577d447 HttpContext identity provider
nelo@MTEySS.neluz.int
parents: 10
diff changeset
35
74eb4577d447 HttpContext identity provider
nelo@MTEySS.neluz.int
parents: 10
diff changeset
36 AgendaFactory.SetIdentityProvider(new HttpContextIdentityProvider());
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
37 }
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
38 }
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
39 }