c# - Web api mvc configuration -
i'm trying figure out global.asax
, lines in mean.
i understood concept of global file can't seem figure out content of means. file:
protected void application_start() { arearegistration.registerallareas(); webapiconfig.register(globalconfiguration.configuration); filterconfig.registerglobalfilters(globalfilters.filters); routeconfig.registerroutes(routetable.routes); }
also, understood there importance order of these lines.
this mvc frameworks bootstrap method hook asp.net framework on startup. application_start
gets called when application domain loaded. can edit file see fit , depending on chose when created project of these lines may or may not included default. have there.
arearegistration.registerallareas();
- registers areas, if have mvc application can configure areas ways further group functionality / views. see areas more detail.webapiconfig.register(globalconfiguration.configuration);
- registers web api routing , additionally add global web api filters.filterconfig.registerglobalfilters(globalfilters.filters);
- add global mvc filters. see previous question method does.routeconfig.registerroutes(routetable.routes);
- initialize mvc routing.
Comments
Post a Comment