rkevinburton (29) [Avatar] Offline
#1
In the Global.asax file I see:

protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();

WebApiConfig.Register(GlobalConfiguration.Configuration);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
AuthConfig.RegisterAuth();
}

If I navigate to RegisterRoutes I see:

public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}

Neither of which are mentioned on page 20 of the book.

So this brings up two questions. One,what are or where do I read about the extra methods in Application_Start()? Two, is it the acceptable proceedure to change the single argument to RegisterRoutes (RouteTable.Routes)? If so where is this defined? Three, I see that RegisterRoutes is defined in RouteConfig.cs. Where is this file? It is not mentioned in section 2.2.2 where a brief description of each file is given. Thank you.

Kevin
rkevinburton@charter.net
554019 (1) [Avatar] Offline
#2
Here was the issue about Application_Start method - https://stackoverflow.com/questions/32167565/global-asaxs-application-start-method-doesnt-get-called - perhaps you can find more info in Global.asax section. Or you may find the forum on {}" >> personal statement help Global.asax methods.