Originally Posted by cspek
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.
-Ryan Hoffman
ASP.NET Specialist / Webmaster,
Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.