annotate Agendas/trunk/src/Agendas.Web/Global.asax.cs @ 278:6f5ab71614d4

#125: ABM de patrocinadores.
author juanjose.montesdeocaarbos
date Wed, 21 Dec 2011 08:47:05 -0300
parents bf993f99cee3
children
rev   line source
275
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents: 179
diff changeset
1 using System.Web;
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents: 179
diff changeset
2 using System.Web.Mvc;
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
3 using System.Web.Routing;
50
3ebe89c88caa Agregando propiedad al Evento sobre el Usuario que lo crea o que realizó la
nelopauselli
parents: 34
diff changeset
4 using AltNetHispano.Agendas.Domain;
34
475be11edf56 Ajuste en los nombre de los assemblies y namespaces
nelo@MTEySS.neluz.int
parents: 19
diff changeset
5 using AltNetHispano.Agendas.Factories;
83
7e9ffde4022d Implementando DataAnnotation desde recursos y por convención
nelopauselli
parents: 67
diff changeset
6 using AltNetHispano.Agendas.Resources.Properties;
84
ee4e699e4551 refactoring menor
nelopauselli
parents: 83
diff changeset
7 using AltNetHispano.Agendas.Web.CustomModelMetadataProvider;
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
8
34
475be11edf56 Ajuste en los nombre de los assemblies y namespaces
nelo@MTEySS.neluz.int
parents: 19
diff changeset
9 namespace AltNetHispano.Agendas.Web
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
10 {
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
11 // Note: For instructions on enabling IIS6 or IIS7 classic mode,
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
12 // visit http://go.microsoft.com/?LinkId=9394801
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
13
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
14 public class MvcApplication : System.Web.HttpApplication
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
15 {
84
ee4e699e4551 refactoring menor
nelopauselli
parents: 83
diff changeset
16 private static void RegisterGlobalFilters(GlobalFilterCollection filters)
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
17 {
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
18 filters.Add(new HandleErrorAttribute());
179
1deccd6c3cb2 Aplicando seguridad x roles en sitio web
nelopauselli
parents: 94
diff changeset
19 filters.Add(NHibernateFactory.GetNHibernateSessionPerAction());
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
20 }
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
21
84
ee4e699e4551 refactoring menor
nelopauselli
parents: 83
diff changeset
22 private static void RegisterRoutes(RouteCollection routes)
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
23 {
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
24 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
25
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
26 routes.MapRoute(
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
27 "Default", // Route name
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
28 "{controller}/{action}/{id}", // URL with parameters
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
29 new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
30 );
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
31
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
32 }
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
33
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
34 protected void Application_Start()
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
35 {
84
ee4e699e4551 refactoring menor
nelopauselli
parents: 83
diff changeset
36 ModelMetadataProviders.Current =
85
8a4135f019dd cambio de nombre de una clase
nelopauselli
parents: 84
diff changeset
37 new DataAnnotationAndConventionModelMetadataProvider(
84
ee4e699e4551 refactoring menor
nelopauselli
parents: 83
diff changeset
38 new ResolverThroughResource<DataAnnotationResources>());
83
7e9ffde4022d Implementando DataAnnotation desde recursos y por convención
nelopauselli
parents: 67
diff changeset
39
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
40 AreaRegistration.RegisterAllAreas();
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
41
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
42 RegisterGlobalFilters(GlobalFilters.Filters);
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
43 RegisterRoutes(RouteTable.Routes);
19
74eb4577d447 HttpContext identity provider
nelo@MTEySS.neluz.int
parents: 10
diff changeset
44
94
db4b1e2cae49 Cambio del nombre de la clase Ponente a Persona
Nelo@Kenia.neluz.int
parents: 85
diff changeset
45 IdentityContext.Init(new HttpContextIdentityProvider(), AgendaFactory.GetPersonaRepository());
10
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
46 }
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
47 }
c62b77fc33f4 website inicial
nelo@MTEySS.neluz.int
parents:
diff changeset
48 }