January 2008 - Posts

Registration for SQLBits II
31 January 08 11:04 PM | Richard | with no comments

It seems there are still some places left for SQLBits II in Birmingham on the 1st of March. If you want to go I suggest you register fast as these community events do fill up fast.

Filed under: ,
Presenting at the first meeting of the Peterborough VBug group
31 January 08 10:18 PM | Richard | with no comments

I enjoyed presenting on TFS at the inaugural meeting of the Peterborough VBug group last night. Thanks to Jyoti Majithia (VBug regional administrator) and Andy Westgarth (VBug chairman) for organising it. Hopefully this will be the start of another thriving user group community.

If anyone wants a copy of the slide stack, there were no major changes between the one I used last night and the DDD5 one our main web site. There is also a screencast of demo of eScrum in the same archive.

I was asked a couple of questions that I could not fully answer off the top of my head:

  • If you have a Novell NDS based LAN how can you install TFS? The answer is TFS does not support NDS or LDAP for authentication. Also you cannot do a Dual Server TFS install as this requires an Active Directory. However a Single Server install will work if all the PCs (clients and servers) are in a Windows Workgroup (as well as the NDS domain).
  • Can I access TFS from inside the Microsoft Expression products or Macromedia products such as Dreamweaver ? For Microsoft Expression the answer is strangely no - this seems a big oversight. User would have to check files out via Team explorer then load Expressions. There is the MSSCCI add-in to allow third party tools to connect to TFS, but this does  not appear to work with DreamWeaver as it has its own means of connection to source control such as VSS.
Filed under: ,
Fun upgrading from Visual Studio TFS 2008 Beta2 to RTM
23 January 08 09:31 PM | Richard | 3 comment(s)

A while ago I made the classic mistake of installing the Beta2 of TFS on our live servers after seeing posts that it was reliable enough for production use. I had stupidly assumed that there would be an upgrade path to the RTM; there usually is from the last beta, but not this time.

TIP: Don't ever do this yourself, only use beta's in places you can throw them away without any issues.

So to fix this problem you have to remove the beta before you can install the RTM. We run a dual server configuration with the application tier on a VPC so I backed up the TFS DBs on our central SQL server, made a copy of the VPC and enabled the undo disk. I then tried to remove the beta 2, and it failed with a message DepCheck indicates Microsoft Visual Studio 2008 Team Foundation Server Beta 2 - ENU is not installed.

I had a search and found some similar reference to the error in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2048187&SiteID=1 that suggest running

"C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Microsoft Visual Studio 2008 Team Foundation Server Beta 2 - ENU\GetCurrentTfsProperties.exe" "%TEMP%\TfsProperties.ini" "Config"

Which as expected reported it could not find all the properties required.

So I had a problem, I could not de-install the old version to put the new one on. But then I got to thinking - I am trying to get this server back to a clean empty state - why not just create a new one? Just like a disaster recovery situation.

So I...

  • Built a new server and added to our domain.
  • I install WSS3 manually so that I could set the DB location to our dedicated SQL server.
  • I installed SQL reporting services and patched it, again pointing it to our SQL server.
  • I then ran the TFS 2008 installer, giving it the location of our DB server, as if just adding a new application tier.

The problems then started. I got a TF220065 RS WMI RPC Server is unavailable error - which sounds like a reporting server install problem (which it is I suppose). When you check the logs it turns out the installer has looked on the db tier for the URL of the AT reporting services location. The db still thought I was using the old AT server, so was getting an error the old server could not be found (because it was off). You can this fix by hand by editing the entry in the tfsintergration.tbl_service_interface table on the DB server. Once this is done the install runs OK until you get TF53007 & TF50801 errors. I guess there is a manual fix for this, but the better solution is to use the proper tool for registering the new server name, which fixes the follow-up errors as well. You can run this from the old TFS AT server, or I guess any PC.

TfsAdminUtil activateAT <New AT COMPUTERNAME>

Once this was run the setup ran to completion.

Now this meant I had a new AT pointing at our old DBs, so I could see all our old team projects, I could access work items,reports and source control. However, for each team project I could not access the site portals or document repositories, but I expected this as I had recreated the whole of the WSS system with a new content DB. This was not an issue for us as we had chosen to use our main company MOSS 2007 system for documents, not the WSS install within TFS (the main reason for this choice being for TFS2005 the portal was a WSS2.0 install and we had already moved to SP2007).

If you want to recreate the TFS portal sites go into the WSS Central Admin and create a site with the right name e.g. http://mysserver/site/project1 and an appropriate template. You then have to give the new site appropriate user rights and all will be OK i.e. you can see the portal and documents from within team explorer. Of course you could also restore a backup of your old install if you had important data.

So I was quite pleased with myself by this point, I had worked all this out by myself. I thought it was all working until I tried to create a new Team project, this failed at creating the SharePoint site point of the wizard. It failed irrespective of the template chosen. The error on the wizard dialog was TF30217 but checking the detailed log it showed the real error was

TF30267: Exception: System.Web.Services.Protocols.SoapException: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.Event Description: TF30162: Task "SharePointPortal" from Group "Portal" failed
Exception Type: Microsoft.TeamFoundation.Client.PcwException
Exception Message: The Project Creation Wizard encountered an error while uploading documents to the Windows SharePoint Services server on [my server]
Exception Details: The Project Creation Wizard encountered a problem while uploading documents to the Windows SharePoint Services server on [my server]. The reason for the failure cannot be determined at this time. Because the operation failed, the wizard was not able to finish

Now this proved to be a nightmare to fix involving many hours of fiddling and calls to Microsoft support. As with so many of this type of problem the fix was trivial when we spotted it. The problem turned out to be due to alternate access mappings in SharePoint. In effect when TFS creates a new site this is equivalent to the STSADM command

stsadm -o createsite -url /sites/projectsite">https://<server>/sites/projectsite -ownerlogin DOMAIN\user -owneremail user@domain.com -sitetemplate _GLOBAL_#1

The key issue was if I used the url https://realservername/sites/projectsite it work, but if I use the full alias url (which I need so the correct SSL wildcard certificate can be used) e.g.  https://tfs.domain.co.uk/sites/projectsite it failed even though tfs is a cname alias for the host realservername on our DNS server. They should be equivalent.

Now I knew SharePoint/IIS needs to know about any extra names you give to servers. I had put an alternate access mapping in SharePoint to cover just this issue (via Central Admin, Operations), but I had made a mistake. I had added the alternate mapping as http://tfs.domain.co.uk - oops should have been https. Once this tiny change was made it leapt into life.

I have to say the error in the TFS create log were not that helpful, neither was the output of the new TFS Best Practice Analyzer. In the end it was found by creating many sites with STSADM.

I must say thanks to the persistence of Microsoft Developer Support in both India and the USA in getting this last issue sorted.

So now I have a fully working TFS 2008 install, I can start to have a look at the TFS to Project Server connector.

Filed under: ,
SQLBits II (the sql)
23 January 08 10:25 AM | Richard | 1 comment(s)

Just heard my session Development Life Cycle using Visual Studio Team Edition for DB Professionals has been accepted for SQLBits II on the 1st of March in Birmingham.

Thanks to everyone who voted for it, and I hope to see you there.

Filed under: , ,
SharePoint, TRACE.WriteLine and DebugView
22 January 08 01:48 PM | Richard | with no comments

I have been debugging some SharePoint 2007 webparts and have had to resort to TRACE output and the SysInternal DebugView; it is like ASP pages in the 90s all over again!

Anyway had a weird problem that only alternate TRACE.WriteLine commands were appearing in the view. I have not found a reason why or a solution as yet, I suspect a buffer flushing issue, but you can work round it once you know it is happening.

Update : Trace.Autoflush= true is the fix - another user too stupid error!

Running the TFS Best Practice Analyzer and 2005 Team Explorer
16 January 08 01:12 PM | Richard | with no comments

If you run the 2008 Power Tools BPA against a TFS 2008 install that has the 2005 Team Explorer also installed on it you will get virtually no reports generated. It runs to completion but the reports are empty.

This is due to some clash between the BPA and the TFS 2005 DLLs (V8.0). Removed the 2005 Team Explorer and it works as expected.

Now you are probably asking why would I have 2005 Team Explorer on a 2008 install? It is because a number of the third party TFS add-ins, such as eScrum, require the 2005 DLLs either to install or to run. As in theory the 2005 and 2008 installs are site side by side so it should not be an issue - but it is for the BPA.

In the case of eScrum the answer is to place the 2005 DLLs in the eScrum web site bin directory (as opposed to the GAC) and all seems to be fine - the BPA works and so does the eScrum web site.

Filed under: ,
Presenting in Glasgow
14 January 08 11:16 PM | Richard | with no comments

I will be doing a TFS and Continuous Integration session for Scottish Developers on the 12th of February

Filed under: ,
CCNet WebDashboard getting assembly does not allow partially trusted callers exception
13 January 08 10:33 PM | Richard | 3 comment(s)

Whilst installing a TFS & CCNet demo system I got an exception

System.Security.SecurityException: That assembly does not allow partially trusted callers

when I tried to load the CCNet WebDashboard.

The problem was that default CCNet installer had created the WebDashboard on the default web site as the virtual directory

http://localhost/ccnet

As this was also a TFS server the default web site was a WSS3 server. Bascially the SharePoint did not like (trust) the CCNet virtual directory's DLLs.

The fix I used was to create a new website and point it as the WebDashBoard directory so it could be accessed without effecting the SharePoint e.g.

http://localhost:81

I could also have edited the SharePoint's web.config to trust the CCNet DLLs

Filed under: ,
TF220066 Error installing TFS
10 January 08 03:46 PM | Richard | 2 comment(s)

I was installing a Dual Tier Team Foundation Server 2008 at a clients today and got a problem that when installing the Application Tier (AT) I entered the name of the Data Tier server (DT) and it said the server could not be found.

Unlike TFS 2005, 2008 does not require you to to do a separate install on the DT to create the empty DBs, so I assumed it was just a connectivity problem. However there was none to be found, so I checked the detailed TFS install error log and saw I had a TS220066 error that also mentioned SQLRS - I guessed at a reporting services issue.

I turns out, stupidly, I had forgotten install SQL Reporting Services on the AT - after all I have previously posted about following the walk-thru for the install!

Once this was installed all was OK; so if you cannot see the DT during the AT install it may not be the remote connectivity issues the dialog says, check the error for more details.

Filed under: ,
TFS WebParts in a 64bit SharePoint environment
04 January 08 04:20 PM | Richard | 1 comment(s)

In my post on using TFS WebParts in Sharepoint I provided a proof of concept set of source to allow work items to be viewed and edited within 32bit SharePoint 2007. However I hit a problem that our live SharePoint is running 64bit and the TFS API is only available for 32bit, so the WebParts  could not be loaded.

To get round this problem I have built a version of the WebParts that move all the 32bit TFS API calls into a separate web service. This allows the web service to be hosted on a 32bit box whilst the WebParts are still run within the 64bit SharePoint environment.

I have used a simple design model in that I just move all the TFS based methods in my previous example to the WebService and passed all the URLs, authentication details and other parameter each time a WebMethod is called. It does the job to show how the system can work, but there are many other options depending on how you want to manage the user IDs the SharePoint users authenticate to TFS as, see my previous posts for a longer discussion of the authentication issues.

In addition to the WebPart setting detailed in the previous post, there is one additional parameter, this is the web service URL e.g.

http://www.domain.com:8091/TFSWrapperWS.asmx 

This should point to wherever you have installed the web service (using standard means of publishing web sites). The web service does not have to be on the TFS server, as this web service only acts as a pass through. Also so there is no need to edit any details in the web service's web.config.

The revised source can be found at in the files section of this blog

Filed under: ,
Next meeting of the Yorkshire Extreme Programming Club
04 January 08 11:43 AM | Richard | with no comments

The next meeting of the extreme programming club is going to be held on the Thursday the 10th of January 2008 at the Victoria Hotel, at 7.00pm, Leeds. I believe the session is on CRAP (Change Risk Analyzer and Predictor) code metrics but this still has to be confirmed.

This is your chance to discuss the future for the user group as I mentioned in my previous post

Great Scrum Video
04 January 08 10:19 AM | Richard | with no comments

I have just had pointed out to me there is a great video about Google's use of Scrum. It is a presentation done by Jeff Sutherland one of the founders of Scrum.

Take a look it is well worth it.

Filed under: ,
Future for the Yorkshire XP Club
03 January 08 09:10 PM | Richard | 1 comment(s)

Times are a'changing for the Yorkshire Extreme Programming and Agile Methods Club, our local user group. There are plans to put the organisation on a more formal structure including a organising committee with the key aim to extend the groups appeal. In the past it has really been driven by the good works of the staff of Erudine, thanks to them for all the work thus far.

To facilitate these changes a new organiser Daniel Drozdzewski from Eurdine has put up a survey to find out what people want and is keen to hear ideas via the forum as he says we "want to bring more interesting speakers and topics, make it more organised and appealing to wider audience."

Make your voice heard

Getting Team Foundation Server to use a remote 64Bit SharePoint 2007 farm.
02 January 08 03:25 PM | Richard | with no comments

If you try to install the Team Foundation 2008 SharePoint extensions on a 64bit farm you get a 'SharePoint must be installed' error; I guess the installer is looking in the wrong directory for something to confirm SharePoint is there.

However, it seems the MSI is only installing some features that are not 32/64bit specific. So you can try a manual install of these features.

The notes on http://msdn2.microsoft.com/en-us/teamsystem/aa718901.aspx give a basic guide, but these were written for the previous SharePoint so you have to alter a few paths, mostly 6.0 to 12.0 in the paths to the Web Server Extensions EXEs, and the templates have moved in Team System to [Program Files]\Microsoft Visual Studio 2008 Team Foundation Server\Tools\Templates

This lack of 64bit support is really starting to become a pain!

Filed under:
TFS Build Agent on Team Foundation Workgroup Edition
02 January 08 09:27 AM | Richard | with no comments

If you see 'TF215085 local build agent not authorized to communicate with team foundation server' when you queue a new build via Visual Studio, you would assume you just have to add the TFSBuild user to the team projects build group as the rest of the message suggests (right click in team explorer for the project and look at the group membership).

However this is not enough it seems if you are running a workgroup edition of Team Foundation server.  You also have to make sure the TFSBuild user is in the licensed users group for the team server (right click the server itself in the team explorer).

Now this could be an issue if you are pushed for users licenses, I suppose the answer is to use a normal user as the build agent's login user.

Filed under: