asp.net - Process Request method in Page Life Cycle -


i need understand below statements

statement - 1

the common handler asp.net page handler processes .aspx files. when users request .aspx file, request processed page through page handler.

statement - 2

you might write own, example, serve images etc database rather web-server itself, or write simple pox service (rather soap/wcf/etc)

statement - 3

what importance of processrequest in page life cycle?

definitions

  • http - protocol allows clients , servers talk each other.

  • iis - microsoft "web server". "web server" mean application 3 things: listens incoming http requests, handles them, , replies http response.

  • asp.net - framework built on top of .net used create custom logic http requests.

  • asp.net web application - type of visual studio project. these projects work, primarily, integrating web server (e.g. iis). building doesn't create executable of kind.

client, http, , iis

  • iis pipeline - series of events http request goes through once enters iis.

  • http handler - primary logic determining http response http request. 1 http handler used per request. handler typically chosen extension of requested resource. example, if .jpg, .png, or .gif (i.e. image) requested handler return image. if .php page requested handler return results of executing php file. iis comes own native handlers. asp.net adds these , allows write own custom handlers.(as example list of handlers on iis website)

iis , asp.net web applications

there complicated relationship between iis , asp.net (from here forward asp.net mean web application unless otherwise noted). can difficult tell 1 begins , other ends.

perhaps important distinction between 2 while iis stand-alone application, asp.net relies on server, iis, run. means there several things iis has (e.g. routing, authentication, , authorization) asp.net can choose involved or not.

asp.net able control custom code injected iis request pipeline defining own handlers , modules. every module gets involved every request using request pipeline events tie in. handlers, on other hand, work alone. 1 chosen act on request.

one final thing worth noting iis , asp.net can work in 1 of 2 different modes, classic or integrated. won't go difference here other answer doesn't matter mode in. modes affect how modules execute.

iis, modules, , handler

system.web.ui.page , ihttphandler

as mentioned asp.net framework allows create own handlers extend iis. handlers can either made scratch or inheriting pre-made handlers in asp.net framework.

(statement 1)the notable of pre-made handlers system.web.ui.page. can tell class handler because implements ihttphandler. means every time create new aspx page inherits system.web.ui.page creating own custom handler handle request page , return proper html.

(statement 2)if you'd make handler scratch can implementing ihttphandler on own classes. interface has 1 method processrequest. when time iis pass off handler call method , pass httpcontext request handling.

(statement 3) entire system.web.ui.page life-cycle occurs in page's processrequest method. if use dotpeek decompile system.web.dll can see processrequest does. of more notable things firing page life-cycle events, rendering webcontrols html, , databinding. so, in sense, processrequest is page life-cycle (or @ least implementation).


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -