[How Do I:] Precompile an ASP.NET Website

Please install Silverlight or click download to watch video locally.

Chris Pels shows how to precompile an ASP.NET website, which increases first-run performance and strengthens application security.

Presented by Chris Pels

Duration: 21 minutes, 35 seconds

Date: 18 December 2008

Watch    Video   |   Download    Video   |   VB Code    C# Code

Video downloads: WMV  |  Zune  |  iPod  |  PSP  |  MPEG-4  |  3GP

Audio downloads: AAC  |  WMA  |  MPEG-4  |  MPEG-3  |  MPEG-2

Comments : 12

Leave a Comment

brokensaber : On December 21, 2008 1:31 AM said:

 Great Video!

 I was wondering though if precompiling can be utalized with a large ecommerce site.

eXtension : On December 23, 2008 11:23 AM said:

Looks promising, gonna watch it!

eXtension : On December 23, 2008 11:46 AM said:

If I have a relatively small site, like say 20 pages, which configuration would give me the best performance? (ignoring maintainability)

rami_nassar : On December 24, 2008 10:25 AM said:

great job.. thanks

eugene22n : On December 30, 2008 10:02 PM said:

I noticed that when using an updateable publish that the generated dll's change their name every single time.  This creates a synchronization issue.  If I "re-publish" a website it creates a whole new App_Web_randomstring.dll so I have to replace all the ASPX files because they reference this file as well.  What would be nice if it just kept the old App_Web_something.dll filename so I wouldn't have to upload and replace everything on the server.

Any suggestions?

MrBlobby : On January 06, 2009 10:12 AM said:

eugene22n,

If you're using VS2005/Express you can use aspnet_merge.exe utility.

Read more about this at:

msdn.microsoft.com/.../aa479044.aspx

Hope this helps.

cpels : On January 27, 2009 10:35 PM said:

aspnet_compiler.exe and aspnet_merge.exe as Eugene22n pointed out are used behind the scenes for the Publish Web menu option in VS. Collectively, they offer a lot of flexibility to address naming issues, # of DLLs, etc.

Re: brokensaber's ? re: compilation of a large e-commerce site, yes, performance would benefit from compilation. However, in a large site you would want to consider the granularity of compilation, i.e., how many DLLs. This would not only be for performance, but for maintenance. You would also want to become familar w/ the "updatable" option.

Chris

Brad Butts : On February 05, 2009 10:05 AM said:

Thanks for this presentation--it was very clean and concise.  If I may, I'd like to suggest a Part 2: Using a Web Setup project to deploy my Precompiled ASP.NET app.  

Re: aspnet_merge.exe...it was my understanding that aspnet_merge.exe doesn't natively deploy with VS.  that, for VS2005, you have to install the Web Deployment Projects (msdn.microsoft.com/.../aa336619.aspx) and, for VS2008, you have to install the Windows SDK for .NET 3.5 (www.microsoft.com/.../details.aspx 6e1c3df-a74f-4207-8586-711ebe331cdc&displaylang=en).  Furthermore, while the Publish Web menu option uses aspnet_compiler behind the scenes, I don't see that is uses aspnet_merge or I would think we would have an option to merge all code-behind to a single, distinctly-named DLL.

bohunt : On February 13, 2009 5:43 PM said:

Thanks!

cleverwisdomforever : On April 09, 2009 12:42 AM said:

Thanks!! Chris Pels.

shahed.kazi : On April 16, 2009 2:35 AM said:

When the aspnet_compiler starts to compile a website, the memory allocated to the compiler keeps on increasing until the compilation process has ended. Why doesn't the compiler release the memory while compiling files.

haithemara : On May 31, 2009 2:50 PM said:

thanks.

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities