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

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -