Don't make the mistake I did with Team Foundation Server 2008 media on MSDN downloads.
The MSDN file en_visual_studio_team_system_2008_team_foundation_server_workgroup_x86_x64wow_dvd_X14-29253.iso is the workgroup edition, as the file name suggests. The problem is that you cannot upgraded it to a full edition. TFS documentation says that a trial or workgroup edition can be upgraded by entering a valid CD-key when in Add remove programs, maintenance mode; however this option is greyed out if you install from this media. I checked with Microsoft and there is no way round this for this ISO image.
So if you want to install or upgrade to TFS 2008 full edition make sure start with the right media, else you will downgrade your installation to a 5 user workgroup.
For anybody who has been to one of our Developer or one of our hosted MSDN events you will most likely have a copy of the developers Highway Code, if not don't worry read on. There is a New Version with added Security goodness. But how much is the new copy £1000, £2000 , no its free. It turns out according to my good and learned friend Guy it is written by Paul Maher, a Technical Evangelist at Microsoft UK but wait there's more , download it now ( December 24th at time of writing ) and enter a prize draw for a copy of Vista Ultimate.
Download it now
Its like all of star wars in one go (and one more) See BizTalk Boy in Action and more
Technorati tags: Xmas
, Black Marble
, BizTalk Boy
, Sharepoint sprite
, Graphics Girl
, Coding Ninja
, CSS Avenger
, Black Marble Brigade
, The Architect
, Black Marble Comcs
SharePoint 2007 displays a nice "friendly" error message when anything goes wrong. This "friendly" error message usually provides no useful information about why the error has occurred (sometimes you get an HRESULT). It may be friendly but isn't usually very helpful, not for a developer.
You can alter this default behaviour by making two changes to the web.config for the site you are debugging.
CallStack is set to false. Change the CallStack setting to true, as shown below -
<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
customErrors mode is set to On. Change the mode to Off, as shown below -
<customErrors mode="Off" />
Hey presto, helpful error messages. Now if I could only fix the error... ;-)
I have been trying to get a simple means for our clients to log faults into our TFS system whilst inside our MOSS2007 based customer portal. I had been suffering from two major problems as my previous posts mentioned. However, I now have some solutions or at least workarounds:
- Historically all users who connected to the TFS server needed a Team Foundation Client CAL - this issue has been addressed by changes in licensing for TFS by Microsoft; basically it is now free to look at work items and add bugs
- The way the SharePoint and TFS APIs handle user identity (SPUser & ICreditial) do not match, and are not improbable. There is no way round the user having to reenter their user credentials for each system - so my web part logs into TFS as a user set via it's parameters, this is not the same user as the credentials used to authenticate into SharePoint, it is in effect a proxy user for accessing TFS
So where does this leave us?
I have posted a set of sample code that provides
- A web part that lists work items
- A web part that shows the details of a work item (using the first webpart for all communications to the TFS server)
- An ASP.NET test harness
- A .WSP and batch file to install the web parts on a SharePoint Server
- Load the solution in VS2008 (if you need to use VS2005 you will need to recreate the solution file, and point at the right TFS API DLLs, but everything else should work)
- Run the test harness project (note as we are using webparts it will have to create a local ASPNETDB.MDF files the first time it runs. The DB contains the config for the webparts so you will see nothing on the first loading until you setup the parameters)
- In the test page select the edit mode at the top of the page, then edit the list webpart in WebPartZone1, enter the following:
- TFSServerURL – the TFS server e.g. http://tfs.mydomain.com:8080
- TFSDomain – the domain used to authenticate against e.g. mydomain
- TFSUsername – the user name to connect to the TFS server as, we create a dedicated user for this webpart to login as.
- TFSPassword – the password used to authenticate with (shown in clear text)
- TFSAllowedWorkItemTypes – a comma separated list of work item types to be listed in the control, must match types in the [System.WorkItemType] field in the TFS DB. Depending on the process template in use the types will vary but as a start in most templates there is a ‘bug’ type.
- TFSDefaultProject – the name of the default TFS project to select on loading, can be left blank
- TFSPagingSize – the number of rows to show in the list of work items
- TFSShowOnlyDefaultProject – if this is set only the default project is listed in the available projects – this means a single TFS user, which can see many projects, can be used for different webpages and the project shown locked down with this parameter
- TFSUsePaging – set if the list of workitems should be page
- Once this is all done and saved you should be able to a list of projects and workitems in the first webpart.
- To wire the two webparts together select the connection mode radio button at the top of the page
- On the web part in WebPartZone2 select the connect option
- In the connections zone that appears create a new connection to link the two webparts
- Once this is done you should see the detail of any given workitem when it is selected from the list. The problem is you see all the fields in the work item (useful for debugging)
- Put web page back into edit mode and edit the settings on the details web part
- TFSFieldsToShow – a comma separate list of field names to be shown.
- TFSShowAllField – if checked the TFSFIeldsToShow is ignored
- When all the configuration is done you have the option to create new bug workitems and add notes to existing ones.
If you want to use the webparts in SharePoint you need to install the feature pack using the .WSP package - I assume anyone doing this will know enough about WSP files and SharePoint to get going.
This all said it is not as if there are not still problems and qwerks:
- You do need the TFC client on the server hosting the webparts, or at least the referenced DDLs - bit obvious really that one.
- When try to connect to TFS you might get an error about not being able to access the TFS Cache - use SysInternals filemon (or maybe the event logs) to check the directory being used and you will find the problem concerns the user running the hosting process (usually a member of the IIS_WPG group) not having rights to fully access the cache directory. Also it is a good idea to delete all cache files before retrying as some people report they had to rebuild the cache to clear the error.
- Interesting point I discover which altered the design - Though the pair of webparts worked perfectly in an ASP.NET test harness, the connection options, when in SharePoint, were grey'd out. Turns out you have to add a second parameter to the consumer declaration else the default name is used for all webparts, which confused SharePoint e.g.
[System.Web.UI.WebControls.WebParts.ConnectionConsumer("Work Item List Consumer", "wilc")] // the second param is an ID for connection
public void InitializeProvider(IWorkItemListToDetails provider)
this.workItemListProvider = provider;
However the last problem was negated by the fact that in ASP.NET you can have a pairs of connections to get bi-directional communications between web parts. In SharePoint you are only allowed a single connection between any two webparts. Hence the current design using some strange boolean flags and logic to manage call backs in the pre-render stage. I left the older code in place, commented out, as a sample.
- And the killer problem for me - you only can run these webparts on a 32bit SharePoint as there there are no 64Bit TFS DLLs. A major problem for us as our SharePoint servers are 64Bit. We need to wait for Rosario it seems before TFS moves to 64bit. Even though 32bit CTPs are available for Rosario as yet there is no date for a 64Bit CTP. I also checked, and WOW64 will not help to wrapper the 32Bit DLLs for a 64Bit OS. I have checked all this with Microsoft support.
So what we have here is a sample solution for 32bit environments. I am going to modify this to work for 64bit by putting all the TFS API bits in a separate WebService to host on a 32Bit server. I will post about this went it is done
I also submitted a session for SQLBits II in Birmingham on using Visual Studio to manage the life cycle of DB projects. The voting for this community conference I assume opens in the new year as submissions close this weekend.
It will be interesting to see if this more central location (well central to England not the UK) attracts more attendees than Reading.
Again vote early and often.
And I may be speaking at Developer Day Scotland - it is all down to you; like other DDD style events the attendees get a chance to select what they would like to see. So keep an eye on the possible agenda and please vote as soon at submission close.
I will be speaking at what I think is the inaugural meeting of the Peterborough VBUG User group in Team Foundation Servers.
For more details see http://www.vbug.co.uk/Events/January-2008/VBUG-Team-Foundation-Server-with-Richard-Fennell.aspx
Hope to see you there.
Gary Short is speaking at Glasgow Caledonian University, 7pm, 16th January 2008. I saw him speak at DDD 6 and he was excellent. Well worth a trip to see.
Link to presentation details
Iron Python hosted in Visual Studio 2008 shell is now available