Friday, August 22, 2008

Web Application Projects - Publish Options

In Web Application Projects (WAPs) we have the following Publish Dialog box.

image

 

It has the target location text box which takes destination to be HTTP (which uses Front Page Server Extensions (FPSE) behind the scenes), FTP, or File System.

Publish settings also allows you to have a clean install or just incremental updates.  Although what is interesting to notice are the various Copy options.  Let us try to understand what these mean:

  • Only files needed to run this application - In a WAP we usually have a Project file, User File,  Bin folder, Obj Folder, ASP.NET pages, User Controls, WCF and Web Services etc.  ASP.NET Pages and other similar files have two additional artifacts in a WAP project as shown below:

image When you build the WAP project the sources from both the .aspx.cs as well as .aspx.designer.cs files are taken and compiled into the intermediate output folder (i.e. OBJ folder) and then finally moved to the (BIN folder)...   

You do not really need the Project Files (.csproj/.vbproj); User File (.user)  to run your web neither do you need any of the code behind or designer files as they are compiled into your Bin folder.  At the same time you also do not need the OBJ folder as that is just the intermediate folder VS uses before produces the final output in the BIN folder.  Based on this rationale VS removes all those files from the publishing process and only publishes the files which are required to run your application (which are your .aspx and other similar markup files), your referenced DLLs and your bin folder.

  • All Project Files - Based on the above discussion it is apparent that your code behind and designer files are part of your project, so are your .user and .csproj/.vbproj...  If you select this option then your entire project with these files is published to remote location.  You can usually use this option to move your working project to any remote location and get working on it without having to do a physical copy of select files.  If you want to share your project with your friends over FTP this is a good option to use. Do note Publish feature does not publishes OBJ folder as it is not a folder that a user should really be worried about, it is just for temporary compilation use.
  • All files in the source Project Folder - Many a times users chose to exclude files from their projects by choosing the "Exclude From Project" command

image

This command essentially removes the artifact from the Project File, although do note that these files are still present in your source project folder.

Apart from this many a times users want to add help files, read me files, references docs (e.g. requirements doc) and other misc items in their project folder while they do not really want to publish these artifacts most of the time.

By choosing "All files in the source Project Folder" you can take all these files (excluding OBJ) folder and transfer it to any remote location via HTTP, FTP or simple disk IO to a UNC location.

The above three options kind of provides all the dials for a user to choose the appropriate publish option applicable to them.

  • Include files from the App_Data folder - App Data folder might potentially contain huge files and sensitive data, hence it is given a special status and you can choose whether or not you would like to publish your App_Data folder or not.  It is selected by default as VS assumes that you need the Data to run your application but if you really do not have anything in the App_Data folder or if you are hoping to use SQL Server in production (as opposed to MDF files & SQL Express during development) then you should go and uncheck this box.

Hope this summary of "Publish" feature for Web Application Projects helps...

Wednesday, August 06, 2008

Can't Go to Beijing? - Enjoy some cool Olympic Games with MS Popfly

clip_image001

clip_image003

Spin, jump and twirl through the air without ever leaving your chair!

To Play:

http://www.popfly.com/users/Team/Gymnastics

 

clip_image005

clip_image007

Dive through the water and hit the target – harder than it looks!

To Play:

http://www.popfly.com/users/Team/Diving

 

clip_image009

clip_image011

Mirror your teammates movements with this synchronized swimming game!

To Play:

http://www.popfly.com/users/Team/Synchronized%20Swimming

clip_image013

clip_image014

Try to light all 14 torches by clicking on them!  Watch out, they’re fast!

To Play:

http://popfly.com/users/team/light%20the%20torches

 

clip_image016

clip_image017

GOOAAAL!!!

Pick countries to go head-to-head in this game of Foosball Soccer!

To Play:

http://popfly.com/users/team/soccer

clip_image019

clip_image020

Ready… Set… Go!  It’s the 100-meter dash, pick your country and hurdle across the Finish Line to Victory!

To Play:

http://popfly.com/users/team/track%20and%20field

clip_image022

clip_image023

Pick your targets carefully, aim, and fire your arrows in this addicting game of Archery!

To Play:

http://popfly.com/users/team/archery

clip_image025

clip_image026

Help Rocket Chicken score his longest Long Jump and win a Gold Medal!

To Play:

http://popfly.com/users/team/long%20jump

clip_image028

clip_image029

Test your ‘Strength’ by keeping the barbell off the floor and trying not to turn red in the face!

To Play:

http://popfly.com/users/team/weightlifting

clip_image031

clip_image032

Forget Tyson vs. Holyfield, this is the real Boxing match of the century: my Xbox versus your Playstation.  It’s Battle of the Game Consoles!

To Play:

http://popfly.com/users/team/boxing

Hope this will be fun!!

-Vishal

Saturday, August 02, 2008

Web Deployment with VS 2008

On July 21st 2006, during ASP.NET Insider summit I had a chance to do a podcast with Wally McClure...  We discussed a bunch of items around Web Deployment with .NET 3.5 and VS 2008...  Some of the topics covered in the podcast are:

  • General Web Deployment Scenarios
  • Web Application Projects vs. Websites
  • Pre-compiling Web Projects (aspnet_compiler.exe)
  • Merging Web Projects (aspnet_merge.exe)
  • Web Setup Projects (MSI files)
  • Web Deployment Projects (WDP)
  • Microsoft Deployment Tool (MSDeploy.exe) 
  • Sql Publising Wizard
  •  

    You can view the podcast at: http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2008/07/25/asp-net-podcast-show-120-deploying-web-applications-with-vishal-joshi.aspx