comparison Agendas/trunk/src/Agendas.Web/Global.asax.cs @ 10:c62b77fc33f4

website inicial
author nelo@MTEySS.neluz.int
date Sun, 13 Mar 2011 18:51:06 -0300
parents
children 74eb4577d447
comparison
equal deleted inserted replaced
9:c90492faf268 10:c62b77fc33f4
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Web;
5 using System.Web.Mvc;
6 using System.Web.Routing;
7
8 namespace Agendas.Web
9 {
10 // Note: For instructions on enabling IIS6 or IIS7 classic mode,
11 // visit http://go.microsoft.com/?LinkId=9394801
12
13 public class MvcApplication : System.Web.HttpApplication
14 {
15 public static void RegisterGlobalFilters(GlobalFilterCollection filters)
16 {
17 filters.Add(new HandleErrorAttribute());
18 }
19
20 public static void RegisterRoutes(RouteCollection routes)
21 {
22 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
23
24 routes.MapRoute(
25 "Default", // Route name
26 "{controller}/{action}/{id}", // URL with parameters
27 new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
28 );
29
30 }
31
32 protected void Application_Start()
33 {
34 AreaRegistration.RegisterAllAreas();
35
36 RegisterGlobalFilters(GlobalFilters.Filters);
37 RegisterRoutes(RouteTable.Routes);
38 }
39 }
40 }