Search code examples
asp.netpage-lifecycleinternals

ASP.NET Page Request Stage...


During the Page Request stage (prior to the Page life cycle), how does ASP.NET determine whether or not the Page needs to be 1) parsed and compiled for the first time or 2) re-parsed and re-compiled due to a markup change (assuming "Allow this precompiled site to be updatable" = true) or assembly change? I can make some pretty safe assumptions, but does anyone know exactly how ASP.NET makes these determinations?

The ASP.NET Page Life Cycle: http://msdn.microsoft.com/en-us/library/ms178472.aspx

EDIT: So, "first time" is determined as the very first resource request off the ASP.NET web site; soooooo, it's not a question of what Page or resource (singular) needs to be parsed and compiled the "first time" it is requested, rather ASP.NET parses and compiles EVERYTHING the FIRST TIME ANY Page or resource is requested. "Reparse and recompile" occurs in what appears to be a "lazy" fashion: when a change to a dynamically compiled file takes place, this invalidates the previously compiled, cached version of that file; this triggers recompilation of it and all effected resources THE NEXT TIME THE CODE IS REQUESTED - depending on the change made, 1-n to all files may have to be recompiled.

Thanks @Mass for the link


Solution

  • you can find all the answers you need at the link below:

    Compiling on First Request

    Recompiling on Change

    Compilation Output

    http://msdn.microsoft.com/en-us/library/ms366723.aspx