Skip to main content
Select a theme:
   
RSS Feed

How to deploy Thrifty.com

Deployment is quite a bit different in ASP.NET 2.0.  To deploy Thrifty.com, we are using the new Web Deployment Project (currently in beta).  It is available for download here.
 
 
We have a new project in our solution, called Thrifty.Deployment.Web (note: I don't think this gets stored in source control).  The properties page of this project determines how it gets compiled.  We are using the following options.
  • Use IIS metabase path for source input (should be set to /LM/W3SVC/1/ROOT/)
  • Allow this precompiled site to be updatable.
  • Create a seperate assembly for each page and control output.
  • Remove the App_Data folder from output location.

Once the properties have been set, the site is compiled by using the Build context menu item on Thrifty.Deployment.Web.  This will precompile the site and dump it to the Output Folder (note: everything in this folder will be deleted first).

Once, the web site has been precompiled, you can copy the needed files to tweb41/tweb04, etc.  The .ascx and .aspx files must be copied from the precompiled directory and not directly from the source code.  This is because the precompiler changes the page and control directives to reference the name of the DLL the code behind is contained in.

New Security Features in ASP.NET 2.0

They have added a lot of new security features in ASP.NET 2.0 especially in the authorization and authentication areas.  Read this FAQ if you are interested in them.
 

Some Useful Utilities for Visual Studio 2005

Nikhil is always posting some good tools for Visual Studio.  He finally released his web development helper for Visual Studio 2005 as well as his JavaScript Utilities Project.
 
I have posted about the Web Development Helper in the past.  Basically, it gives you the ability to see inside the cache, viewstate, etc. 
 
 
The JavaScript utilities is a set of tools that let you do some advanced JavaScript features.  This could prove useful when we are working on the Reservations Functionaltiy Improvements project.
 
 
I strongly encourage you download both of these, since we will be using Visual Studio 2005 exclusively by the end of December.

Visual Studio Fast Tips Videos

Trying to learn more about Visual Studio 2005?  Sign up for Fast Tips.  These bi-weekly videos will be delivered directly to your inbox.  Each video is 5 - 8 minutes in length.
 

PDC05 Session Highlights DVDs have arrived

As I mentioned earlier, you can get most of this information online.  However, if you are interested in borroing a DVD and looking at the content, I've got them down here.

New HTML Editing Features in Visual Studio 2005

If you haven't messed with Visual Studio 2005, there are a ton of new HTML editing features such as Intellisense everywhere, Standards Support, Intellisense for user controls and custom controls, formatting, and the list goes on.  Take a look at this article, to see more.
 

How to run a root "/" site with the Local Web Server

As I have mentioned in the past, you are no longer required to set up IIS on your machine to run a web site.  There is a builtin web server that will run your site for you.  The problem with this is that it always runs the site in a sub folder.  This causes problems with a lot of sites because you may have references to controls, images, stylesheets, etc. using an absolute path (i.e.: /stylesheets/base.css).  You can either change all of your references to use the ~ (i.e.: ~/stylesheets/base.css) or you can reconfigure the builtin web server.  (Remember ~ tells ASP.NET to go to the root of the application.)
 
Scott Guthrie posted a useful tip on how to do this.  Here are the basic steps.
 
Step 1: Select the “Tools->External Tools” menu option in VS or Visual Web Developer.  This will allow you to configure and add new menu items to your Tools menu.
 
Step 2: Click the “Add” button to add a new external tool menu item.  Name it “WebServer on Port 8080” (or anything else you want).
 
Step 3: For the “Command” textbox setting enter this value: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.EXE (note: this points to the web-server that VS usually automatically runs).
 
Step 4: For the “Arguments” textbox setting enter this value: /port:8080 /path:$(ProjectDir)
 
Step 5: Select the “Use Output Window” checkbox (this will prevent the command-shell window from popping up.
  
Once you hit apply and ok you will now have a new menu item in your “Tools” menu called “WebServer on Port 8080”.  You can now select any web project in your solution and then choose this menu option to launch a web-server that has a root site on port 8080 (or whatever other port you want) for the project.
 
You can then connect to this site in a browser by simply saying http://localhost:8080/.  All root based references will work fine
Step 6: The last step is to configure your web project to automatically reference this web-server when you run or debug a site instead of launching the built-in web-server itself.  To-do this, select your web-project in the solution explorer, right click and select “property pages”.  Select the “start options” setting on the left, and under server change the radio button value from the default (which is use built-in webserver) to instead be “Use custom server”.  Then set the Base URL value to be: http://localhost:8080/
 
You can read the whole article here.

WinFX SDK November 2005 CTP Released

Finally, a WinFX SDK that works on the release version has been released.  This page contains all the links that you need.
 

Ambiguous Match Found Error (What causes it)

The issue was found by Microsoft and it is pretty wierd.  Apparently, at one time, a control was named with the wrong case in the location time control (i.e.: blueChipImageLink).  It was since corrected, but the declaration was left in the code behind.  The migration wizard didn't find a matching control in the markup so it left this declaration alone.  For some reason, when you precompile, it has an issue with this.  So basically since I had a control BlueChipImageLink in the markup and blueChipImageLink in the code behind, it caused the Ambiguous Match Found error.

No more need for Set as Start Page

In the past you always had to choose a page with the Set as Start Page menu item.  Now Visual Studio 2005 is smart enough to launch whatever page you have selected in the solution explorer whenever you debug the project.

Even more Free Online Training

Microsoft really wants to make sure you know about their new stuff.  The page below, has a ton of free online courses.
 

PDC05 Post-Show DVD Set is on the way.

The four disc post-show DVD set shipped out over the weekend.  I am guessing we will probably see this is in a few days.  Also of note is that all of the presentations are now online, so you can watch the presentations and download the powerpoints here.
 

Launch Events Tomorrow

Don't forget that the launch events are tomorrow.  If you haven't signed up yet, go do so.  Be sure to print out your ticket so that they will let you in.

How Visual Studio Excludes Files from Web Projects

Since there is no longer a .csproj file, Visual Studio had to come up with a new way of excluding files.  Well this in fact is extremely lame.  It simply renames the file with a .exclude file extension.  This causes all sorts of warnings about SourceSafe not being able to support renames properly.  Quite lame.

Tempory ASP.NET Files Folder. Learn to love it.

The Temporary ASP.NET Files folder (located at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\) is effectively an assembly cache for things that you compile.  When using dynamic compilation (or any time you are debugging through Visual Studio), it is here where those temporary assemblies get stored.
 
The problem is after you start compiling a bunch and you make a bunch of changes, you may find that your site was building successfully a few minutes ago and now you are getting some random error mentioning a DLL in the Temporary ASP.NET files folder.  Once you get this error, there is nothing you can do in Visual Studio to fix it.
 
Here is what you have to do.
  1. Close Visual Studio 2005.
  2. Kill the ASP.NET worker process aspnet_wp.exe.
  3. Go to the Temporary ASP.NET Files folder and delete everything inside it.
  4. Restart Visual Studio 2005.
  5. Build the Web Site.

The first two steps are required because usually at least one of those DLLs is in memory and can't be deleted.  Hopefully, this will help you with this issue when it comes up for you.

Express Editions have been released for Free

Today, Microsoft announced that the Express editions of Visual Studio will be free for an entire year.  It was originally speculated that these would cost $49 or $99.  If someone you know would like to get more familiar with Visual Studio these are a great way to start since they are very oriented to new developers.
 
The products available are:
  • Visual Web Developer Express
  • Visual Basic Express
  • Visual C# Express
  • Visual C++ Express
  • Visual J# Express
  • Sql Server Express

Plus if you register they are giving the following benefits away.

250 royalty-free stock photography images from Corbis
Free Windows Icons from IconBuffet
Free eBooks including: Microsoft Visual Web Developer 2005 Express Edition: Build a Web Site Now, Microsoft Visual Basic 2005 Express Edition: Build a Program Now!, and Microsoft Visual C# 2005 Express Edition: Build a Program Now!
3rd party components from VSIP partners

The link is below.

Visual Studio Express

Terrible at design? Try a Design Template!

Do you have a personal web site that you wish looked better (Kyle)?  Microsoft has some new design templates available for download.  All of which are standards based using XHTML, CSS, and support that 508 accessibility stuff.  There are four design templates to choose from: Commerce, Personal, Corporate, and Small Business.
 
Try one out today and give your old site a makeover.

Step-By-Step Guide to Migrating Web Projects from 1.1 to 2.0

I have already tackled migrating Thrifty.com from ASP.NET 1.1 to 2.0, but you never know when you might have some other web project elsewhere that you want to upgrade.  This article details the migration process.
 

PayPal Commerce Starter Kit

Microsoft is all about providing working samples to help get you going with ASP.NET 2.0.  This one is kind of cool if you have a business on the side to sell stuff.  It's a commerce site that has built in integration with paypal.  Check it out at http://www.commercestarterkit.org/.  Let me know if you try it out and if its worth using.

Register your copy of Visual Studio 2005

Once you get your copy of Visual Studio 2005, be sure and register your copy by clicking on Help -> Register Product.  Once you complete the short form, you will be sent an e-mail that provides acess to icons, components, online courses, and and E-books.

Microsoft Visual Studio 2005 Team Suite Trial

So you decided you want it all and you just have to have Team Suite installed.  First I have discovered that if you already have another version installed (i.e.: Team Developer, not another build i.e.: RC1), you can install Team Suite on top of the existing version.  Secondly, it will be good to know that the trial is 180 days, so you can keep it installed for quite some time.

Watch the Visual Studio 2005 Launch Keynote

If you are interested in watching the launch keynote today, it starts at 11:00am CST.  You can watch it at the link below.
 

Visual Studio 2005 (Release) ISO files

I have ISO files for both Visual Studio 2005 Team Developer and Visual Studio 2005 Team Suite (Trial).  All of you should install the Team Developer version except for Bobby.  Team Suite is a trial and only Bobby and I will end up having licenses for it.
 
The files are located at \\5w-42109\downs.
 
Team Developer - en_vs_2005_vstd_dvd.iso
Team Suite Trial  - en_vs_2005_vsts_trial_dvd.iso
SQL Server 2005 Standard Edition - en_sql_2005_std_x86_dvd.iso
 
All of these can be installed using the virtual cdrom control panel.  Please let me know if you have any questions.

Ctrl+K, Ctrl+D More than just formatting now.

Do you have code that the ASP.NET 1.1 designer screwed up like the snippet below?
<TABLE cellSpacing="0" cellPadding="0" width="495" border="0">
<TR>
<TD class="SubHeader">&nbsp;
<frameworkcontrols:label id="BookItLabel" Key="BookItTitle" ResourceName="ReservationLabels" ResourcePath="/Configuration"
CssClass="BoldLabel" Runat="server"></frameworkcontrols:label></TD>
<TD class="SubHeader" style="font-size: .9em; text-align: right;">
<asp:LinkButton id="ChangeBookItButton" Runat="server" BorderStyle="None" Font-Underline="True"></asp:LinkButton></TD>
<TD class="SubHeader" width="40"></TD>
</TR>
</TABLE>
Now this can be easily corrected in Visual Studio 2005 by using the Format Document menu option (shortcut Ctrl+K, Ctrl+D). It will autoamtically clean up your code and lowercase any html elements that might be capitalized like below.
 <table cellspacing="0" cellpadding="0" width="495" border="0">
<tr>
<td class="SubHeader">
&nbsp;
<FrameworkControls:Label ID="BookItLabel" Key="BookItTitle" ResourceName="ReservationLabels"
ResourcePath="/Configuration" CssClass="BoldLabel" runat="server">
</FrameworkControls:Label>
</td>
<td class="SubHeader" style="font-size: .9em; text-align: right;">
<asp:LinkButton ID="ChangeBookItButton" runat="server" BorderStyle="None" Font-Underline="True"></asp:LinkButton></td>
<td class="SubHeader" width="40">
</td>
</tr>
</table>

NOTE: This site is migrating to DotNetMafia. For the latest tips on Visual Studio 2008, SharePoint, and MOSS, see Corey's .NET Tip of the Day.