I have read about the asp.net worker process but I am not very clear about the same.
I have read only one worker process is created for every processor. But, they have also specified that looking into the performance of the worker process, a new worker process is created if the old worker process has more requests in the queue. How is this possible????
I have also read that the worker process activates the http pipeline of objects by creating a new instance of http runtime object and calls the process request method. In that case, when exactly is the process request method called?? Is it after the http modules being called and executed or before??
I have also read that Application Factory gets the application object from the pool of application objects. In that case, if a change has been made to the application object in one of them how does it get reflected in all other objects??
When ever I build a web application the msil code is generated ( first compilation). When a request is made, dynamic compilation is done in the server. Is this compilation from msil to the machine language code??
It said that when ever a new web application is created and requested, the asp.net worker process looks into the appdomain. If the appdomain does not exist for that particular application, creates a new appdomain, includes all the references made by it and dynamically compiles. What exactly is this compilation???
I am totally confused about all this..Please help me out regarding the same.
Thanks and Regards,
CSPEK

You can only control the Worker Process via IIS6, which is only available in the Windows Server 2003 family of operating systems. I'll answer more of your questions later ;-).

When ever I build a web application the msil code is generated ( first compilation). When a request is made, dynamic compilation is done in the server. Is this compilation from msil to the machine language code??

You're not understanding the way ASP.NET compiles things. When you first compile your application (at design time), your codebehind files get compiled into a .NET Assembly (dll file; with MSIL code). When your application first gets hit, ASP.NET checks to see if your aspx page was compiled (which, it hasn't, because this is the first hit). ASP.NET then compiles your aspx page into another .NET Assembly and stores the complilation in ASP.NET's caching system. Note; that is the point where ASP.NET differs from all scripting languages (such as regular ASP, PHP, etc). ASP.NET compiles your web page source; even your standard html tags get compiled (and stored as string literals). Next, ASP.NET would run the compiled assemblies (using the .NET CLR to interpret the MSIL), and respond to the client with your finished page.

I'm sure you've noticed the small delay that you have when you FIRST visit an ASP.NET page after you've compiled it. But, after revisiting the page, there is no delay. This is because of the compilation that goes on to your web page source (which was described in the last paragraph). On the second request to the page, ASP.NET knows that the page is already compiled, so thus skips the compiling and uses what is already in cache.

Thanks,
I still have some doubts with the ProcessRequest method. Who calls this method?? Is it the HttpApplication object or the worker process.
Thanks and Regards,
cspek

You're not understanding the way ASP.NET compiles things. When you first compile your application (at design time), your codebehind files get compiled into a .NET Assembly (dll file; with MSIL code). When your application first gets hit, ASP.NET checks to see if your aspx page was compiled (which, it hasn't, because this is the first hit). ASP.NET then compiles your aspx page into another .NET Assembly and stores the complilation in ASP.NET's caching system. Note; that is the point where ASP.NET differs from all scripting languages (such as regular ASP, PHP, etc). ASP.NET compiles your web page source; even your standard html tags get compiled (and stored as string literals). Next, ASP.NET would run the compiled assemblies (using the .NET CLR to interpret the MSIL), and respond to the client with your finished page.

I'm sure you've noticed the small delay that you have when you FIRST visit an ASP.NET page after you've compiled it. But, after revisiting the page, there is no delay. This is because of the compilation that goes on to your web page source (which was described in the last paragraph). On the second request to the page, ASP.NET knows that the page is already compiled, so thus skips the compiling and uses what is already in cache.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.