Precompilation

Discussion in 'ASP.NET 2.0' started by brians, Mar 11, 2006.

  1. Hello - Under ASP.NET 1.x the website was precompiled into a dll. It seems to me that under 2.0 each page is compiled as it is requested. I tried using the aspnet_compiler.exe toprecompile the website and copy the resulting dll's to the bin directory. But I ran into some issues:

    1) When thewebsite loads, it didn't like some code I had app_code.dll accessing profile information.
    2) It didn't likemy app_global.asax.dll

    So, my questionsare:
    Is there a way under ASP.NET 2.0 to precompile your website?
    If there is a way, what are the switches for the aspnet_compiler and the steps to copying the dll's? or is there another way to do it?
    Is it worth it to precompile? Does it makea difference?

    thanks - brian
     
  2. When you Publish Web Site with Visual Studio 2005, it precompiles your application and uploads the precompiled DLLs to the web server. The precompilation is actually done on-the-fly and your local copy remains un-precompiled. If you use Copy Web Site in Visual Studio, it doesn't precompile your application.

    A precompiled application runs faster, but I think it's only noticably faster if you have a lot of pages and a lot of hits.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Thanks for the reply Aristotle.

    Poking around on the web, I found the following article which filled in some of the details on the topic of precompilation using the aspnet_compiler - http://www.odetocode.com/Articles/417.aspx.

    enjoy - brian
     

Share This Page