Microsoft Content Management Server Resources
subcribe to the feed.
r.a.d.editor MCMS edition AchieveForms Lite CMS.Rapid MCMS Manager GotDotNet User Samples MondoSearch Metalogix Migration Assistant Cubik OneStopCMS IT Hit Web Author Enhancements Home >  Technical Articles > Technical Articles > Upgrading the WoodgroveNet Sample Site

Upgrading the WoodgroveNet Sample Site

Updated: January 26th 2005.


A number of people have requested information regarding upgrading the WoodgroveNet Sample Site to an MCMS SP2 application which uses ASP.NET 2.0 and Visual Studio 2005. Whilst the WoodgroveNet sample is not considered best practice in many areas and certainly does not demonstrate any SP2 concepts, it can be useful in assessing the impact of upgrading your MCMS applications.

This article provides a walkthrough of upgrading the WoodgroveNet Sample to run on ASP.NET 2.0 and be developed using Viusal Studio 2005.


Step One: Make a backup!
Before proceeding make a backup of the Sample Data files created by the WoodgroveNet installer.

  1. Using Windows Explorer navigate to the MCMS installation folder (usually C:\Program Files\Microsoft Content Management Server).
  2. Right click the Sample Data folder and click Copy.
  3. Right click any white space in the Explorer window and click Paste.


Step Two: Upgrade the WoodgroveNet application.
The WoodgroveNet sample consists of two projects, WoodgroveNet itself - a MCMS Web Application and a Control Library project named MCMSWebControlLibrary. Upgrading the Control Library project is uneccesssary, and most of its functionality would be naturally be replaced by SP2 features, doing so would also vastly increase the upgrade effort.

  1. Using Windows Explorer navigate to the WoodgroveNet project folder (usually C:\Program Files\Microsoft Content Management Server\Sample Data\WoodgroveNet).
  2. Double-click the WoodgroveNet.csproj file to launch the Visual Studio Conversion Wizard.
  3. On the Welcome to the Visual Studio Conversion Wizard dialog, click Next.
  4. On the Choose Whether To Create a backup page, select the No radio button and click Next. (We have our backup from step one)
  5. On the Ready to Convert page click Finish.
  6. On the Conversion Complete page click Close to open the Conversion report.
    You should see three warnings. One is related to the default console, which can be ignored as can the item concerning resources (for the time being). The other warning is related to the type of Web Site project created, we will address this next.
  7. From the File menu click Close Solution, and when prompted click No.


Step Three: Modifying the Web Application and opening as a IIS Web Site.
The WoodgroveNet Virtual Directory in IIS is still configured to use ASP.NET 1.x. We need to change this before proceeding

  1. From the Start Menu click Run....
  2. In the Open... text box enter inetmgr and click OK.
  3. Expand the tree view to show the WoodgroveNet Virtual Directory.
  4. Right click the WoodgroveNet Virtual Directory and click Properties.
  5. Click the ASP.NET tab, select 2.0.50727 in the ASP.NET version combo box and click OK.
  6. Close Internet Information Services and switch back to Visual Studio 2005.
  7. From the File menu click Open, followed by Web Site....
  8. In the Open Web Site dialog click the Local IIS icon and the WoodgroveNet Virtual Directory. Click Open.


Step Four: Modifying the application resources.
With ASP.NET developers can take advantage of strongly typed access to resources without the need for firing up a ResourceManager. The Conversion Revision did the first step for us (moving the resx file into the App_GlobalResources special folder), we now have to modify the code which uses these resources.

  1. In Solution Explorer expand the Templates folder.
  2. Right click ManualLogin.aspx and click View Code.
  3. Locate line 54
  4. Replace the right hand side of the operators with the new Resource access syntax. Your code should now be:
    LTManualLoginDomain.Text = Resources.WoodgroveNetResource.LoginDomain;
    LTManualLoginNTUserName.Text = Resources.WoodgroveNetResource.LoginNTUserName;
    LTManualLoginNTPassword.Text = Resources.WoodgroveNetResource.LoginNTPassword;
    LTManualLoginRememberCredentials.Text = Resources.WoodgroveNetResource.LoginRememberCredentials;
    ManualLoginSubmit.Value = Resources.WoodgroveNetResource.LoginButton;
    LTInvalidUserMessage= Resources.WoodgroveNetResource.InvalidUserMessage;
    LTAccessDeniedMessage = Resources.WoodgroveNetResource.AccessDeniedMessage;
    LTGeneralExceptionMessage = Resources.WoodgroveNetResource.GeneralExceptionMessage;
    LTArgumentOutOfRangeExceptionMessage = Resources.WoodgroveNetResource.ArgumentOutOfRangeExceptionMessage;
    LTSSLStatus = Resources.WoodgroveNetResource.LoginHTTPS;
    LTSSLWarningMessage = Resources.WoodgroveNetResource.LoginSSLWarning;

    We need to do the same for all other uses of the LocalizationResourceManager.
  5. From the Edit menu click Find and Replace, followed by Find in Files.
  6. In the Find what text box, enter LocalizationResourceManager and click Find All.
  7. Use to Find Results pane to navigate to and correct each use of the LocalizationResourceManager.
    Note you can optionally comment out or remove all declares and instantiations of the now redundant ResourceManager class. The benefits of strongly typed access to resources are now apparant as a attempted build will fail, we need to fix the original application by adding an additional resource.
  8. In Solution Explorer within the App_GlobalResources folder, double click WoodgroveNetResource.resx.
  9. Add a New String Resource named JobAppInstruction and provide a Value.


Final Steps
You can now build and debug the WoodgroveNet application which is now hosted by ASP.NET 2.0 and can develop it further using SP2 features! At this stage you may wish to remove now redundant files from the project, such as the individual resx files for each MCMS template. Happy development!


© 2001 - 2006 Triumph Media Limited. All rights reserved.
Microsoft Corporation is in no respect affiliated with