Execution detail of Asp.net

T

thomson

Hi all,
When we request a webpage a series of process takes place,
from the beginning of the request till we get the requested page.
I have gone through numerous articles, of how it is done, but
iam bit confused also, Till now i was knowing only that the request
goes to the iis server, then it calls the asp.net worker process and so
on.
but recently i read an excerpt from an article and it says

NET Framework assemblies are typically compiled and deployed into a
Windows DLL-based PE format. When the common language runtime's loader
resolves a class implemented within this type of assembly, it calls the
Windows LoadLibrary routine on the file (which locks its access on
disk), and then maps the appropriate code data into memory for run-time
execution. Once loaded, the DLL file will remain locked on disk until
the application domain referencing it is either torn down or manually
recycled.

My confusion is how to link the above excerpt with
the one i have mentioned on the top, ie: when a request is made, it
goes to the IIS

Does any one have a complete article or a utility that shows the
request-> response processes

Thanks in advance

regards

thomson
 
T

thomson

Hi,
The links you have mentioned is the page life cycle, in fact that is
not my question, my question is the connection between the page life
cycle and Windows LoadLibrary routine, i want to link these two

Regards

thomson
 
B

bruce barker

its pretty simple. when content is mapped to asp.net, the asp.net filter
usesa named pipe to talk to aspnet_wp.exe worker process. when the first
page is accessed (or on a recycle), the worker process creates an app
domain for the vdir. at this time it scans bin dir for dll's, copies them to
a temp dir, then loads them (here is the call to LoadLibrary). it then
compiles the page to a dll in a temp dir, and loads the page (again a call
to load library), then creates a class instance of the page. then the page
process cycle begins.

its the copy of the dlls to temp dir that keeps them from being locked in
vdir itself. if you copy a new dll to the bin dir, asp.net uses a
filewatcher to detect the change, and loads a new appdomain, stop sending
requests to the old app domain, and when the old domain has no more active
threads, unloads it.

-- bruce (sqlwork.com)


| Hi all,
| When we request a webpage a series of process takes place,
| from the beginning of the request till we get the requested page.
| I have gone through numerous articles, of how it is done, but
| iam bit confused also, Till now i was knowing only that the request
| goes to the iis server, then it calls the asp.net worker process and so
| on.
| but recently i read an excerpt from an article and it says
|
| NET Framework assemblies are typically compiled and deployed into a
| Windows DLL-based PE format. When the common language runtime's loader
| resolves a class implemented within this type of assembly, it calls the
| Windows LoadLibrary routine on the file (which locks its access on
| disk), and then maps the appropriate code data into memory for run-time
| execution. Once loaded, the DLL file will remain locked on disk until
| the application domain referencing it is either torn down or manually
| recycled.
|
| My confusion is how to link the above excerpt with
| the one i have mentioned on the top, ie: when a request is made, it
| goes to the IIS
|
| Does any one have a complete article or a utility that shows the
| request-> response processes
|
| Thanks in advance
|
| regards
|
| thomson
|
 
T

thomson

Hi ,
I need a clarification on the line
"it then
compiles the page to a dll in a temp dir, and loads the page (again a
call
to load library",
Because all the the dlls are already compiled and
kept in the bin directory. So what is the necessity of compiling the
page in another temp dir.
The temp directory u have mentioned is the same as the one we
have copied the dll's

Regards
thomson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top