Craig Shoemaker

<January 2009>
SuMoTuWeThFrSa
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567


Navigation

The Roll

Subscriptions

News

Check out the Podcast
Polymorphic Podcast - the show about object oriented development, architecture and best practices in .NET
Subscribe to the Blog
ASP.NET 2.0 AJAX
Beginning Ajax with ASP.NET

Post Categories



Thursday, September 14, 2006 - Posts

ASP.NET 2.0 Compilation and Deployment Quick Reference

ASP.NET changes the way you handle compilation and deployment from what you might be used to from working with ASP.NET 1.1. Rick Strahl wrote an excellent article that describes the nuances in great detail. Check out his article for the step-by-step process, but at a high level there are a few facts you should be aware of when you are ready to deploy your ASP.NET 2.0 applications.

You may choose to deploy your web application to the server using one of three general options:

Note: There are more than three options, but this is a quick reference, so you are just getting the basic differences.

Pre-compiled: Allow Updates to ASPX
When you choose to pre-compile your website you have the option to allow updates to your ASPX files. If you choose to allow these updates DLLs are created for the code behind files in your web project. These files are generated with a random name and the publish feature will update your ASPX files to point the Inherits attribute to the appropriate DLL (which houses your namespace and class for each page).

Pre-compiled: Restrict Updates to ASPX
If you choose to pre-compile and not allow updates to your ASPX pages, all of your code (including HTML) is compiled into the DLL and the physical ASPX is placed on the web server as a marker, holding no markup or code whatsoever.

Dynamic Compilation: Allow Updates to ASPX and CS/VB Files
For reasons detailed below, you may choose to simply copy ASPX and CS/VB code behind files up to the web server in the same manner as they exist on your development machine. When the first user to hit a page arrives, the web server will compile the code for that page and allow execution throughout the site. The performance penalty is negligible as the compilation is only for that single page and only for the first user to hit the page.

Which Option is Best?
As always the answer is dependent upon your circumstances.

  • Pre-compilation allowing updates garners a performance gain, but forces you to re-deploy all of your ASPX files to the server when a change is made to ANY codebehind in the website.

  • Pre-compilation restricting updates gives you an even further performance gain, but you will not be able to add non-server processed updates to a web page without having to recompile.

  • Dynamic compilation is the easiest to maintain, but results in slightly lower performance and a potential security risk of your source files living on the web server.

Hopefully this helps you as you begin working with ASP.NET 2.0 website. Like I said this is just a quick reference, be sure to do your homework for the details.

posted Thursday, September 14, 2006 11:36 AM by drazz75 with 1 Comments

Win a Free Copy of 'Beginning Ajax with ASP.NET'

I am often asked how listeners can support the Polymorphic Podcast. One of the best (and most valuable) ways to show your support is to simply tell others about what you like!

As my way of saying thanks for your endorsement, you can win a free copy of "Beginning Ajax with ASP.NET" by simply telling others. Just send an email telling someone about the show (be sure to CC  show{at}polymorphicpodcast{dot}com), or better yet enter a blog post with a link back to http://polymorphicpodcast.com/ and you are in the running! 

(If you choose to do a blog post, please be sure to send me an email at show{at}polymorphicpodcast{dot}com. Yes I will pick up the post in my blog search aggregations, but I want to be fair to those who know about the book offer.)

I will pick two winners at random from emails and two winners at random from blog posts. The winnners will be annouced on the first show in November on the Polymorphic Podcast.

Thanks!

Craig

posted Thursday, September 14, 2006 9:58 AM by drazz75 with 0 Comments




Powered by Dot Net Junkies, by Telligent Systems