Wednesday, March 18, 2009

Problems in changing username for TFS services

I changed the username that's running all the TFS services on the TFS Application Tier machine. I noticed the next day that certain information such as users in the Assigned To dropdown, Areas, Iterations, etc. were not getting updated in a timely manner. What's going on? It turns out its in the Integration services. At http://tinyurl.com/TfsRefreshNieDziala is a discussion on this topic.

The following SQL on the TFS data tier will show whether or not the username on the TFS application tier has all 4 necessary subscriptions in place.

select s.address, i.domain, i.account_name from TfsIntegration..tbl_subscription s
left join TfsIntegration..tbl_security_identity_cache i on s.subscriber = i.sid
where delivery_type = 2


In my case the results didn't work so I had to login to the application tier server as the username running the TFS services and run the following 5 DOS commands in sequence substituting my server name for "".

cd C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools

BisSubscribe.exe /eventType DataChangedEvent /deliverytype Soap /address http://:8080/VersionControl/v1.0/Integration.asmx /server http://:8080

BisSubscribe.exe /eventType DataChangedEvent /deliverytype Soap /address http://:8080/WorkItemTracking/v1.0/SyncEventsListener.asmx /server http://:8080

BisSubscribe.exe /eventType BuildCompletionEvent /deliverytype soap /address http://:8080/WorkItemTracking/v1.0/Integration.asmx /server http://:8080

BisSubscribe.exe /eventType ProjectCreatedEvent /deliverytype Soap /address http://:8080/Warehouse/v1.0/warehousecontroller.asmx /server http://:8080


On the 3rd one for a BuildCompletionEvent I got an error "requested value 'soap' was not found". When I dropped off the deliverytype parameter as follows it worked fine:
BisSubscribe.exe /eventType BuildCompletionEvent /address http://:8080/WorkItemTracking/v1.0/Integration.asmx /server http://:8080

So it appears to work properly now for the Assigned To dropdown. But the Areas dropdown is still not working properly. The Event viewer on the Application Tier server shows the TF51338 error. Solving this problem requires putting this username into the TFS Server's Service Accounts group. This can't be done in the TFS GUI like can be done for other server or team project groups in TFS. It requires the TFSSECURITY.exe command line utility. I went to a DOS window on the application tier server and typed in the following:

cd C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools
tfssecurity.exe /server: /g+ "[Server]\Service Accounts" n:\tfsservices

Presto!! It worked :) My updates to Areas/Iterations get updated realtime into the Areas and Iterations tree views in the Work Item GUI of Visual Studio or TSWA. As soon as I click "refresh" on the Team Project my list of users in my "Assigned To" dropdown gets filled in.

No comments:

Post a Comment