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:
- Update Windows
Visit Windows Update (http://windowsupdate.microsoft.com/) and install all items in the Critical Updates and Service Packs group.
- Install Microsoft .NET 3.0
Install Microsoft .NET Framework version 3.0, which is a prerequisite for WSS 3.0.
- 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).
- 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.
- Pre-upgrade scan your WSS v2 sites
Run prescan.exe /all from the command prompt.
prescan.exe is located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\.
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.
- 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.
- 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.
- 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.
- 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:
- 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 Files\Common Files\Microsoft Shared\web server extensions\12\BIN\
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
- 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 Files\Common Files\Microsoft Shared\web server extensions\12\ADMISAPI
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:\Inetpub\wwwroot\wss\VirtualDirectories\#### (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:\Inetpub\wwwroot\wss\VirtualDirectories\####\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):
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:\Inetpub\wwwroot\
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:\Inetpub\wwwroot\
- 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.