Click to See Complete Forum and Search --> : What's the relation between aspnet_wp and CLR.Is aspnet_wp
riteshjain1982
Apr 28th, 2008, 11:39 AM
Can anyone please tell me what's the relation between aspnet_wp (IIS Service) and CLR.Is aspnet_wp is a part of CLR which executes/Compiles the web related Classes just like JIT in windows based application?
What i am trying is to co-relate the Way how CLR execute the windows application where it has different component to perform specific task like class loaded,Verifier,JIT complier,GC etc.......
As u mentioned WP will contain all the application domains even CLR does the same thing for windows application so is it something like WP is Equivelent to CLR for Web application....
If ASPNET_WP is not as sub part of CLR than , when the CLR come into picture to perform the roles like loading assembly,GC,Performing Security check etc while serving any web request or is there is any communication between WP and CLR to peform these task.. ..........
alex_read
May 5th, 2008, 06:17 AM
This should explain things a little easier - if you want - you can search MSDN for the asp request lifecycle, something like that. There was a great article with a diagram explaining all the steps - unfortunately I don't have the link any more here.
User submits a webform from a webpage on your website from his client PC.
webpage sent via Internet to your server as a web POST request.
your web server - IIS picks this postage up, bit like a mailbox in a way. It's process name is called inetinfo.exe.
modules attached to IIS review the webpage postage. I'll try sticking with the post office example and say these are like post office sorter workers looking out for country addresses. The ASP.NET module (an ISAPI called aspnet_isapi.dll) looks out for ASP.Net webpages. I.e. it might look for an aspx extension of the page content posted. There might be another ISAPI process similarly looking for Java based webpages which need processing on this same server etc.
When the ASP.NET ISAPI process finds that it has an ASP.NET file, it seizes it and passes it to another process - the ASP.NET worker process aspnet_wp.exe. Think of the ISAPI as merely a parser, a process to validate whether a file is an ASP.Net webpage. This would be the equivalent of a post office sorter noticing a parcel with "HMRC Personal Details Of UK Inhabitants" and passing this onto someone with a computer to read the CD's in the parcel.
The ASP.NET worker process evaluates the file and can understand .Net code and is aware of the .Net framework libraries and code. It's this process which is responsible for saying "hmm, a submit button was pressed - ohh look the code-behind is telling me to put the user submitted entry into a database, ok I can do that". This'd be the equivalant of someone looking at the HMRC CD's with a CD-Rom drive and Windows explorer software to hand.
The CLR is what executes the .Net code upon the machine. It contains the garbage collector process and executes machine level code in order to run the requested actions the ASP.Net worker process passes to it. The last analogy - this'd be like the OS reading the HMRC CD.
Hope this helps!:D
alex_read
May 5th, 2008, 06:25 AM
As u mentioned WP will contain all the application domains even CLR does the same thing for windows application so is it something like WP is Equivelent to CLR for Web application....
In addition to the above, the CLR works in a similar fashion in Windows and Console applications to the way it does with Web applications. In the Windows environment, a command line call or Visual Studio button click can trigger a build/compile/makefile process. This called process is part of the .Net framework library.
The resulting machine-code level file produced, can then be executed (well thinking about it, or run in the debugger, not neccessarily just executed as stand-alone) and it is at this stage where the CLR comes into play. Think of the CLR as a platform between Windows and the .Net framework. It is a platform to execute code, inclusive of tools such as the garbage collector and debugger to process the running code. If it helps, you can compare it to the Sun Java runtime virtual machine, responsible for code execution, and not to be confused with the Java SDK (the .Net framework)...
Good question that one!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.