When the first request arrives at your web application there is a mind-numbing amount of work to do.
- The worker process starts,
- The runtime initializes.
- ASPX pages are parsed and compiled to intermediate language,
- Methods are just-in-time compiled to native code -
- And the list goes on and on............
- ASP.NET dynamically parses and compiles all the ASPX pages in a folder.
- ASP.NET also needs to compile applicable files in the special folders, like App_Code.
- Any code-behind files associated with ASPX and ASCX files.
If you want to cut out some of the overhead and improve the startup time of your application, then you’ll want to look at the precompile features in ASP.NET 2.0.
There is two provisions for Pre-Comiplation.
- In Place Pre-compilation :
- Used in Development Environment.
- aspnet_compiler.exe -v /<Existing Virtual Directory Name>
- Pre-compilation For Deployment
- Used at the Deployment time.
- aspnet_compiler.exe -p /
-v / < Existing Source Path > -v / < Destination Path >
Note : M.M Imp
However this all can be achieved using IDE as well. For this you need to Publish the Site, and choose the options accordingly.
Hope it is clear now...