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

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

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -