Upgrade TFS V1 to WSS 3.0 Guide


 


!! THIS BLOG IS OBSOLETE SINCE MICROSOFT IS DELIVERING A GUIDE ON MSDN !!


 


For users who want to install TFS SP1 after this upgrade an update of this blog is available. In the new blog I explain how to fake a WSS v2 site on a WSS v3 server. For new users, first install TFS SP1 and then follow this guide for upgrading to WSS 3.0.


For users who want to install TFS in a FQDN (Fully Qualified Domain Name) environment I added some blogs how to setup an environment like this.


The last time I wrote an article about upgrading your TFS V1 environment to WSS 3.0, I got a lot of reactions. Some where good, some where not. Most of the complaints where about "Can't you write a simple upgrade guide.". I'm aware that my previous post wasn't clear enough and I didn't use any steps in it. So this is the first thing I gonna set straight in this post. The previous post was also to complex and you had to do to much manual steps (e.g. Don't upgrade, upgrade the content database, reconfigure Reporting Services, e.t.c.). Luckily I found out you can do an upgrade after all. Other complaints I got that I was changing the Process Guidance Templates which isn't the proper way. This part really frustrated me to, so I deep dived into Team Foundation Server and searched for the problem which prevent me for creating a new site from the Team Explorer. The good news is, I found it, and have two solutions for it. One is for all administrators of TFS and the other is for the Microsoft Team. One thing still stands as Brian Harry commented in my Blog "The last remaining issue that you may hit is when you try to upgrade to a future version of TFS. You may find yourself trying to hack your way through that too.". I can't do anything about it right now, because I and the most of you don't know which parts Microsoft will patch when they deliver 'Orcas'. Of course its advisable to backup your system and databases before you do any upgrade. Furthermore I recommend you to download the latest MSF Process Guidance. All points which have been carried by Jason Barile are refuted in this blog.


Install Procedures:



  1. Update Windows
    Visit Windows Update (http://windowsupdate.microsoft.com/) and install all items in the Critical Updates and Service Packs group.


  2. Install Microsoft .NET 3.0
    Install Microsoft .NET Framework version 3.0, which is a prerequisite for WSS 3.0.


  3. Change WSS v2 port
    Click Start, click Control Panel, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
    Right-click the SharePoint Central Administration folder and then click Properties.
    Change the TCP Port to a none existing port number (e.g. 9999).


  4. Install Microsoft Windows SharePoint Services 3.0.
    Select the default upgrade 'Yes, perform an automated in-place upgrade'.
    You should not change the default selections in any other feature areas.
    Click the Install Now button and accept the warning.
    Deselect Run the SharePoint Products and Technologies Configuration Wizard now and click on close.


  5. Pre-upgrade scan your WSS v2 sites
    Run prescan.exe /all from the command prompt.
    prescan.exe is located in C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN.
    You must use the pre-upgrade scan tool to scan all Web sites in your environment to check if any errors exist before you perform an upgrade.


  6. Upgrade WSS v3
    Click Start, click Control Panel, click Administrative Tools, and then click SharePoint Products and Technologies Configuration Wizard.

    On the Configure SharePoint Central Administration Web Application page,
    check Specify port number: 17012 (Default port for TFS SharePoint)
    You should not change the default selections in any other feature areas.

    The wizard will now start 10 tasks to complete the upgrade in WSS.

    Update Fabrício Braz: We can't forget to emphasize that the SQL Server 2005 has to be set up to using both TCP/IP and named pipes for local and remote connections. Otherwise, the step 6 won’t work at all.


  7. Post-upgrade WSS v3
    When you hit Finish button the SharePoint 3.0 Central Administration site is opened and shows an upgrade status page in your browser at http://server:17012/_admin/UpgradeStatus.aspx. Please be very patient, because this post-upgrade could take quite some time. Check Step within the action compared to the Total steps in this action. When the upgrade status shows Finished, click on the Finalize Upgrade link, and click on the Complete Upgrade button.

    When the upgrade is finally finished you may configure your complete SharePoint Server (e.g Email, Search).

    Update Mike B: By default the account used for installing TFS only has permissions for creating new team projects. You can add other accounts by signing in at the http://{myserver}/default.aspx site with this account.


  8. Check your Reporting Server and WSS sites
    Open the reporting site in your browser at http://servername/reports.
    Open one of the team projects in your browser at http://servername/sites/teamproject.

    For sites that were customized in a Windows SharePoint Services-compatible design program in which the server administrator has chosen to keep the customizations during the upgrade, your home page will have the look and feel of the Windows SharePoint Services 2.0 site rather than the Windows SharePoint Services 3.0 site and will not include all of the Windows SharePoint Services 3.0 features. Site owners should consider discarding the customizations by using the Reset to site definition link on the Site Settings pages for those sites. (Caution: By doing this the MSF Agile look and all your report links will be removed.) This will give the customized pages the Windows SharePoint Services 3.0 default and uncustomized version of the page, including all of the Windows SharePoint Services 3.0 features. With e.g. SharePoint Designer, you can customize your Site Template again.


  9. Open Visual Studio Team Explorer to open your project using the new WSS v3 site.

You now have configured all your current project sites to use WSS v3. To create new Team Projects, you have to the following steps. These steps will not change any of your Process Templates and will not harm your TFS server in anyway. These steps will change the behavior of your WSS v3 site so TFS can communicate with it, like it's a WSS v2.


New project procedures:



  1. Add Process Template to the server
    Before you can use the WSS v3 to create a site, the template for the selected Process Template must be upgraded to a WSS v3 template, else you'll get the following error: "TF30267: Windows SharePoint Services version 2 templates are not supported in this version of the product."
    You can download a VSTS_MSFAgile.stp and VSTS_MSFCMMI.stp Template for WSS v3 here or you can create your own by doing the following steps.


    • Go to an upgraded site and save the site as Template by clicking on Site Settings.
    • Click on Save site as template.
    • Give the file and template the exact same name as which it is stored in your Process Template.
      You can find the site template name in the WssTasks.XML which you can open if you download the process from the Process Manager.
      For MSF for Agile Software Development -v4.x its VSTS_MSFAgile.
    • Download the file from site template gallery in the site and store it at C:

    Run stsadm from the command prompt to delete the WSS v2 template and add the WSS v3 template.
    stsadm can be found at C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN

    stsadm syntax: stsadm -o deletetemplate -title <template title>

    For example: stsadm -o deletetemplate -title VSTS_MSFAgile


    stsadm syntax: stsadm -o addtemplate -filename <template file> -title <template title>

    For example: stsadm -o addtemplate -filename C:VSTS_MSFAgile.stp -title VSTS_MSFAgile

    Run iisreset /noforce


  2. Change the WSS Admin Webservice
    As soon as you try to upload a new Process Template or you want to create a new Team Project, you'll get the following error: "TF30162: The language id specified in the process template does not exist on the WSS server".


After a deep and thorough search, I found out the WssSiteCreator class of the ProjectCreationWizard calls a method VerifyLcidOnServer, which checks the LCID's on the WSS Server. This verification is done by using the GetLanguages method of the WSS Admin Webservice. This is where the problem comes in. In SharePoint v2 this method didn't return any XML namespace, so it was really easy to populate and to query with XPath. In SharePoint v3 GetLanguages returns a XML namespace, as it should be, like W3C recommends.


<Languages xmlns="">
  <LCID>1033</LCID>
</Languages>
Return GetLanguages WSS v2


<Languages xmlns="http://schemas.microsoft.com/sharepoint/soap/">
  <LCID>1033</LCID>
</Languages>
Return GetLanguages WSS v3


XmlNode xml = admin.GetLanguages();
XmlNodeList nodeList = xml.SelectNodes("LCID");
Current code MS Team is using for populating


XmlNode xml = admin.GetLanguages();
XmlDocument xmlDoc = xml.OwnerDocument;
 
XmlNamespaceManager xmlnsManager = new XmlNamespaceManager(xmlDoc.NameTable);
xmlnsManager.AddNamespace("mike", xml.NamespaceURI);
XmlNodeList nodeList = xml.SelectNodes("//mike:LCID", xmlnsManager);
Code MS Team should use for populating (This works for WSS v2 as for WSS v3) 

 



Because I don't have the sources of Team Foundation Server or WSS v3, I have to arrange something otherwise. In this code part I'll parse every method to the original Webservice except the GetLanguages method. In this method I'll copy all nodes and remove all the namespaces so the code of the TFS TeamExplorer will understand it. By doing this TFS thinks it's a WSS v2 machine. Maybe this solution isn't the best, but it works for me.


using System;
using System.ComponentModel;
using System.Collections;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web;
using System.Xml;
using System.Net;
using System.Security.Permissions;
 
namespace SharePoint.WebService
{
    /// <summary>
    /// Summary description for Admin
    /// </summary>
    [WebService(Namespace = "http://schemas.microsoft.com/sharepoint/soap/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    public class Admin  : System.Web.Services.WebService
    {
        [WebMethod]
        public string CreateSite(string Url, string Title, string Description, int Lcid, string WebTemplate, string OwnerLogin, string OwnerName, string OwnerEmail, string PortalUrl, string PortalName)
        {
            AdminProxy.Admin spAdmin = new AdminProxy.Admin();
            spAdmin.Credentials = System.Net.CredentialCache.DefaultCredentials;
 
            return spAdmin.CreateSite(Url, Title, Description, Lcid, WebTemplate, OwnerLogin, OwnerName, OwnerEmail, PortalUrl, PortalName);
        }
 
        [WebMethod]
        public void DeleteSite(string Url)
        {
            AdminProxy.Admin spAdmin = new AdminProxy.Admin();
            spAdmin.Credentials = System.Net.CredentialCache.DefaultCredentials;
 
            spAdmin.DeleteSite(Url);
        }
 
        [WebMethod]
        public XmlNode GetLanguages()
        {
            AdminProxy.Admin spAdmin = new AdminProxy.Admin();
            spAdmin.Credentials = System.Net.CredentialCache.DefaultCredentials;
 
            XmlNode xmlNode = spAdmin.GetLanguages();
            XmlDocument xmlDoc = new XmlDocument();
 
            xmlDoc.LoadXml("<Languages></Languages>");
 
            foreach (XmlNode childNode in xmlNode.ChildNodes)
            {
                XmlNode targetNode = xmlDoc.CreateNode(childNode.NodeType, childNode.Prefix, childNode.Name, "");
                targetNode.InnerXml = childNode.InnerXml;
 
                xmlDoc.DocumentElement.AppendChild(targetNode);
            }
 
            return xmlDoc.SelectSingleNode("Languages");
        }
 
        [WebMethod]
        public void RefreshConfigCache(System.Guid VirtualServerId, bool AdminGroupChanged)
        {
            AdminProxy.Admin spAdmin = new AdminProxy.Admin();
            spAdmin.Credentials = System.Net.CredentialCache.DefaultCredentials;
 
            spAdmin.RefreshConfigCache(VirtualServerId, AdminGroupChanged);
        }
    }
}
Code of the new Admin Webservice 

 



A Compiled SharePoint.Webservice.dll and a new admin.asmx can be found here.

To use these files you must open the Windows Explorer and go to C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12ADMISAPI




Unfortunately you must change the trust level of the SharePoint site to be able to run this Webservice on your machine. Open the Windows Explorer and go to C:InetpubwwwrootwssVirtualDirectories#### (Random number, ShartePoint Central v3 Administration)




    • Edit the web.config in the current directory and change its trust level.
    • <trust level="WSS_Minimal" originUrl="" />
      <trust level="Full" originUrl="" /> (Full with a capital F)


Open the Windows Explorer and go to C:InetpubwwwrootwssVirtualDirectories####bin




    • Copy the downloaded or self compiled SharePoint.Webservice.dll in the directory.


Update Bart Gunneman : You need to change the trust level, because you deploy your new asmx into the bin folder of this website. If you deploy it into the GAC it should not, in theory, be necessary to raise the trust level.


Open the original admin Webservice in your browser at http://localhost:17012/_vti_adm/admin_org.asmx
Open the new admin Webservice in your browser at http://localhost:17012/_vti_adm/admin.asmx


You now have upgraded your TFS configuration to WSS v3. Everything should work now, like it did before. So you can use all all the features in Team Explorer like Show Project Portal..., New Document Library..., Upload Document... and New Folder. But you could also create new Team Projects and down- and upload new Process Templates. The last step in this guide is to cleanup everything which is leftover by the installation of TFS.


Cleanup procedures (Extra, Not Necessary):



  1. Uninstall WSS 2.0
    Click Start, click Control Panel, and then click Add or Remove Programs.
    Remove
    Microsoft Windows SharePoint Services 2.0

    When the program is removed click Start, click Control Panel, click Administrative Tools, and then click SharePoint 3.0 Central Administration. This will reconfigure your machine.

    Caution: After uninstalling WSS v2: Your security on the root web.config has changed


    Open the Windows Explorer and go to C:Inetpubwwwroot
    Open the security properties of
    web.config
    Click the Advanced button and select Allow inheritable permissions from parent to propagate to this object and all child objects.


Update: Don't remove WSS v2, you'll need it for updates.


Reboot
Reboot your system to make sure all changes are made successfully.


I have seen on some machines that after a reboot I also need to change the trust level of the SharePoint site itself, else the documents won't show up in the Team Explorer.


Open the Windows Explorer and go to C:Inetpubwwwroot




    • Edit the web.config in the current directory and change its trust level.
    • <trust level="WSS_Minimal" originUrl="" />
      <trust level="Full" originUrl="" /> (Full with a capital F)

To do a final test you could upload a new Process Template (Just download a template from the Process Manager. e.g MSF for Agile Software Development -v4.x and modify its name in the ProcessTemplate.xml)


Summary
My summary of the previous blog still stands and still hopes the MS Team will give us the support as soon as possible. Besides this I hope the most of you will test this Guide and help me to make it more complete. I only tested it on a TFS Single-Server, so maybe someone can test it on TFS Dual-Server as well. Furthermore it will be nice to test it on a clean machine, so TFS will do a full configuration of WSS v3. I'll test this the next coming week. Ok, there are some disadvantages (You must downgrade your trust level and do an upgrade of the Webservice), but compare to the advantages of WSS 3.0, at least give it a try. At my company we will use it too, so we can eat our own Dogfood. This way I guarantee you I'll deliver a guide for upgrading to 'Orcas' as well.

Update: This upgrade works for a single-, as a dual server installment. It's not possible to install TFS on WSS v3 from scratch.


 


17 thoughts on “Upgrade TFS V1 to WSS 3.0 Guide

  1. Mike B

    Mike,
    I followed you instructions carefully and had pretty good success with the install. I only ran into 2 issues.

    1. I couldn't create a new project with my domain account because i didn't have the permissions in
    SharePoint. The account I used to install team server works fine and has no problems creating a new team project.

    2. When I viewed the project in team explorer from my local machine logged in under my domain account, I get a red x on only the documents folder.

    It turned out that tfs didn't add me to the admin role on the root team portal site
    http://{myserver}/default.aspx site.
    I will be running a test tomorrow to see if this occured because my domain account was already setup before the WSS 3.0 upgrade. My premis is that if I add a new user to the licensed user & tfs administrator roles that it will automaticly setup the sharePoint role as well, but if it doesn't this may be a warning that you might want to post, about having to manually configure security in multiple places.

    the second problem, with the documents folder, turned out to be a problem with permissions on the child sharePoint site for that project.

    Just figured if it happened to me it's bound to happen to someone else. Hope this information is of use to you.

    Mike B

    Reply
  2. Mike B,

    Thnx, for your great comment. I totaly forgot to write about this issue. By default only the setup account has access to the root SharePoint site.

    I updated my Post.

    Reply
  3. Oren

    First, thanks for your excellent posts on getting WSS 3 to work with TFS. I'm in the misdt of rebuiding my app tier (very weird kerberos issues before), but when I'm done, I'm considering following your steps.

    I wanted to know what you think though about copying the TFS virtual directories/apps to the sharepoint site (and adding the appropriate path exclusions) as to allow all day-to-day activities to be on a single port.

    The reason is that it's easier to allow a single SSL port open than two and credentials will be reused since it's the same site...the user will only need to enter credentials once.

    I have to say that the worst part of getting the app tier before setup was sharepoint. I wanted to use a regular DNS name for all TFS access to allow seamless external access, and it was very painful to get set up. The main issues I think were that Sharepoint recognized the default site as http://computer/ instead of the desired access point of https://tfs.blah.com. When the PCW went to create subsites, it failed since it couldn't find an instance of the tfs.blah.com site on sharepoint. I eventually solved it by unextending the site, adding a host-header so that the admin service would see the name and reextending.

    Maybe another good blog topic would be to detail all of the steps necessary to set the name of a TFS server to be a dns hostname and having it locked down using only SSL. There are a number of places settings need to be changes, rangning from various config files, the tfsadminutil, the registry and sharepoint. In the end, it's painful but worth it. Now it's just a port issue as ISA Server doesn't make it possible to have mutliple SSL ports on a single listener. With an ISA Web listener, a user can authenticate against it and Kerberos Constrained Delegation can auth the user to the TFS. Another thing that's nifty is that ISA can use Forms-Based auth with Basic fallback for non-browser clients (over SSL obviously). That way, an external user can have a friendly login for sharepoint but still use the web services easily.

    Anyway, thanks.
    Oren

    Reply
  4. Oren,

    Thnx for your great comment about working with TFS. Unfortunately I received the email you send me (3 January) just a couple of weeks ago. Tough I did reply to one thing in your comments and that's about hosting TFS on a FQDN. The SSL issue I will postpone because I have so much other issues to resolve (Maybe a good post for you). Your first question about copying the TFS virtual directories/apps to the SharePoint site (and adding the appropriate path exclusions) I really like. If I manage to do so, I will add an extra post to my blog.

    Reply
  5. Cristal,

    Check your NT credentials. You probably did a move of admin_org.asmx instead of copy. With a move the credentials of the previous directory stay intact. e.g. C:Temp

    Reply
  6. CristalWood

    I use 10 hours look around for solution.

    At 2:00 AM i am so tired , i can just stare at the letters : "403 FORBIDDEN" .

    Now I checked NT credentials, it is working excellent!!!

    thank you, your solution is beatiful 🙂

    Why Microsoft don't do the fix on code? It's so strange.

    Reply
  7. Rakesh Luhar

    I have one TFS running with wss 2.0. I want to move my TFS from that machine to other TFS running on wss 3.0. I am able to transfer TFS data but can you guide me how to move sites from wss 2 to wss 3.

    My email is rjluhar@yahoo.com.

    Thanks.

    Reply
  8. Rakesh,

    The easiest way to do this is add the content database of WSS 2.0 to WSS 3.0.

    - Backup the WSS 2.0 Content Database STS_Content_TFS.
    Set the existing WSS 2.0 Content Database to be read-only in SQL Server 2005. This will prevent users from making changes to the SharePoint site during the migration.

    - Restore a backup copy of the WSS 2.0 Content database. We will be restoring the same database we just backed up under a new name (WSS_Content_TFS) to a database server.

    - Set the content databases to read-write. Do this step for both the newly restored content database and the original WSS 2.0 content database.

    - Add the new database to the WSS 3.0 Web application.

    stsadm -o addcontentdb -url http://ATMachineName:port -databasename WSS_Content_TFS -databaseserver DTMachineName

    ATMachineName and DTMachineName, could be the same server.

    Good luck,

    Reply
  9. My post Upgrade TFS V1 to WSS 3.0 Guide and Upgrade TFS V1 to WSS 3.0 round 2 - TFS SP1 became obsolete, because Microsoft is delivering their own guides on MSDN now. I even reviewed parts of this guides and tested everything on different machines with different settings. 

    You can find both guides at this link TN1501: Configuring Windows SharePoint Services 3.0 on the Visual Studio 2005 Team Foundation Server Application Tier or TN1502: Configuring Windows SharePoint Services 3.0 on a Remote Server to work with Visual Studio 2005 Team Foundation Server

    Furthermore you'll need an additional hotfix for your Team Explorer to connect to WSS 3.0 correctly. You can find more info about this at support.microsoft.com/.../932544 and connect.microsoft.com/.../DownloadDetails.aspx

    Greetings,

    Reply
  10. Adam

    Does anyone know what might be causing this error:

    friendlyMessage for task upgradebootstrap is An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: Action 3.0.2.0 of Microsoft.SharePoint.Upgrade.SPConfigurationDatabaseSequence2 failed.
    12/22/2007 01:40:35 9 INF debugMessage for task upgradebootstrap is Failed to upgrade SharePoint Products and Technologies. Further information regarding this failure can be found at C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12LOGSUpgrade.log.
    An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: Action 3.0.2.0 of Microsoft.SharePoint.Upgrade.SPConfigurationDatabaseSequence2 failed.
    Microsoft.SharePoint.Upgrade.SPUpgradeException: Action 3.0.2.0 of Microsoft.SharePoint.Upgrade.SPConfigurationDatabaseSequence2 failed. ---> System.Data.SqlClient.SqlException: DDL statement is not allowed.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *