Solving random 404 errors while editing release definition environments on TFS 2015


Dealing with too many environments


Getting straight to the point, remote chances are that you may be using way too much environments on a single release. Normally, this would never happen, as the usual route is to have dev, qa, staging, and production environments at most. And because of that, they never thought this could possibly become an issue.

When you edit a release, a web api call is made to check the current user’s permission to access each one of them. If this method happens to fail, you won’t be able to access the context menu options for each environment (such as variables or deployment conditions). Click here to read more.

How to find everyone (and their groups) on TFS 2015


All the groups


Sometimes it’s difficult to know who is in which TFS group. The groups keep getting bigger, some people change from one department to another, a group gets created for a particular set of special permissions, and so on, and so forth. Be it for auditing or just to keep things tidy and organized, knowing who is in which group can be a tiresome task by navigating group by group.


The query


For all that matters, let’s say [Tfs_Configuration] is our TFS 2015 configuration database. With this, you can get group membership recursively until you figure out who is in which group. Please note that this may not be the best/fastest way to do it, as I didn’t worry too much about optimization. Click here to read more.

The end to all of your TF14098: Access Denied, or how to figure out wrong permissions (TFS2013)


But I do have permissions!


I’ve come across a pestering access issue on TFS2013 (On-Premises), where I couldn’t delete some branches because I had no access to path/*. After reviewing my permissions a thousand times on the accusing path, I almost gave up and used tf destroy to incinerate them. (PROTIP: don’t do that unless you ABSOLUTELY have to). Most of the times, this problem is caused by a permission set in some subfolder or file inside of the folder you’re willing to delete. The thing is: VS doesn’t tell you exactly what files have the treacherous permission set that drives you to insanity. Click here to read more.

A mild Caveat while reading the InputStream in a Custom TFS Plugin if you’re using Git as Source Control

This is related to the implementation of a custom plugin using ITeamFoundationRequestFilter.

You can go to the first part of my post series by clicking the link below:

https://conradoclarkdeveloper.com/2015/03/02/iteamfoundationrequestfilter-part1-tfs

This post is a fix to a possible problem while reading requests if you’re using Git.


The problem with InputStream


In my first posts about implementing ITeamFoundationRequestFilter, I’m using HttpContext.Current.Request.InputStream to read the contents of the request. It happens so that, depending on the implementation, this may break Git functionality. If you access the InputStream before trying to push content to git, the following error is shown: Click here to read more.

Same yet different. Getting information from a TFS Request (WebAccess JSON)

This is the third part of a series on how to implement a validation plugin using ITeamFoundationRequestFilter.

You can go to the first part by clicking the link below:

https://conradoclarkdeveloper.com/2015/03/02/iteamfoundationrequestfilter-part1-tfs

In this post I’ll explain how to handle work item create/update requests from WebAccess.


What’s in the request again ?


Last time we figured out what Visual Studio requests to TFS in order to create/update Work Items. With this information, we’ve created a simple validator which prevents a specific user from creating work items. It may work wonders when the request is being sent to the ClientService.asmx service as VS does, but unfortunately this kind of operation is not centralized, so if you try to create the work item through WebAccess, your validation just won’t work.

Keeping that in mind, we’re going to inspect WebAccess to figure out how does it creates/updates work items. It’s actually easier than before because we can see the request in the browser itself: Click here to read more.

Different yet the same. Getting information from a TFS Request (Soap XML)

This is the second part of a series on how to implement a validation plugin using ITeamFoundationRequestFilter.

You can go to the first part by clicking the link below:

https://conradoclarkdeveloper.com/2015/03/02/iteamfoundationrequestfilter-part1-tfs

In this post I’ll explain how to intercept a work item creation request and prevent the operation from executing.


What’s in the request ?


After creating a simple plugin using an ITeamFoundationRequestFilter implementation, you are now able to intercept requests to TFS.

I recommend using a software such as Fiddler to capture requests and observe what they’re like. In our case, we’re going to investigate what goes on when we create a WorkItem on Visual Studio and on Web Access. I’ll also be using Fiddler since it’s well known and easy to use. Click here to read more.

Like water through a sieve. Word on how to implement ITeamFoundationRequestFilter


How this came up – The problem with Work Item Process Editor 


If you’ve worked a fair time with TFS you know it surely has its pitfalls and issues. One thing that upset me a lot before is validating work items. You never know what kinds of requirements people can come up with, and with such a limited interface there isn’t much you can do. Click here to read more.