Troubleshooting Team Foundation Server and IIS

Since about two weeks, I ran into all kinds of errors when working with Team Foundation Server 2010 using Visual Studio 2010. Whenever I tried to execute operations on a project level, such as updating to the latest version, getting a specific version, or checking in the entire project, I got all kinds of error messages. Checking in - or getting files - one by one seemed to work just fine.

Depending on the action I was trying to complete, the current phase of the moon, and whether or not I was wearing shoes that day, I was faced with a multitude of exceptions, including:

Multiple errors occurred during the operation, the first of which is displayed below. A full error list is available in the Output Window. C:\Projects\Project\File.aspx: The underlying connection was closed: An unexpected error occurred on a receive.

or

Team Foundation services are not available from server TFSServerName\DefaultCollection. Technical information (for administrator): The underlying connection was closed: An unexpected error occurred on a receive.

or

Multiple errors occurred during the operation, the first of which is displayed below. A full error list is available in the Output Window. C:\Projects\Project\File.aspx: TF30063: You are not authorized to access Microsoft-IIS/7.0.

Either way, I got multiple errors, connections were closed, I was or was not authorized to do what I wanted to do, and best of all, it was all very unexpected. Indeed....

I tried all kinds of things to resolve the issue. I rebooted the TFS server, rebooted my development machine, reloaded the project from TFS, logged into my development box using TFS Admin credentials and more, all to no avail.

The suddenly I realized something; I don't know why, but something just popped into my head. A few weeks ago, I had been experimenting with the The Dynamic IP Restrictions (DIPR) module for IIS 7.0. The ASP.NET security problem was getting lots of attention at that time (and a fix wasn't available yet), and I was looking into ways to mitigate the problem (not sure if it would have helped). What the DIPR does is keep track of the number of requests made in a certain timeframe. When the threshold is reached, the module starts throwing 401, 403 or 404 exceptions, or simply aborts the request (which is what I had configured). I had applied the module system-wide, so it was effective for all sites on my server, including the Team Foundation Server site that hosts the web services that TFS and VS use. And all of a sudden it made a lot of sense. Apparently, Visual Studio executes many requests per second (and rightfully so; updating a single project can easily mean updating hundreds of files; I don't like to wait, so VS tries to do that as fast as possible) and thus easily hits the threshold set by the module. That also explains why getting just a handful of files worked fine, while getting an entire project failed every single time.

I logged into my TFS server, disabled DIPR for the Team Foundation Server web site, and tried again. Voila: instant success. haven't seen the error anymore since I changed that setting.

Hope this helps someone....


Where to Next?

Wonder where to go next? You can read existing comments below or you can post a comment yourself on this article .


Consider making a donation
Please consider making a donation using PayPal. Your donation helps me to pay the bills so I can keep running Imar.Spaanjaars.Com, providing fresh content as often as possible.



Feedback by Other Visitors of Imar.Spaanjaars.Com

On Wednesday, June 26, 2013 2:10:15 PM Vianey Alfaro said:
What if the TFS server is installed in Server 2003 with IIS 6 and it is throwing the same errors. Any ideas?
On Thursday, June 27, 2013 6:52:47 AM Imar Spaanjaars said:
Hi Vianey,

I don't know; sorry. Does it throw 404s for everything or just occasionally?

Imar
On Friday, June 28, 2013 2:14:34 PM Bernie Clary said:
Could you provide steps to disabling DIPR? I am unable to find that setting in the Admin console.

Thank you
On Friday, June 28, 2013 8:10:39 PM Imar Spaanjaars said:
Hi there,

Have you looked in Add/Remove programs or the Web Platform Installer?

Cheers,

Imar

Talk Back! Comment on Imar.Spaanjaars.Com

I am interested in what you have to say about this article. Feel free to post any comments, remarks or questions you may have about this article. The Talk Back feature is not meant for technical questions that are not directly related to this article. So, a post like "Hey, can you tell me how I can upload files to a MySQL database in PHP?" is likely to be removed. Also spam and unrealistic job offers will be deleted immediately.

When you post a comment, you have to provide your name and the comment. Your e-mail address is optional and you only need to provide it if you want me to contact you. It will not be displayed along with your comment. I got sick and tired of the comment spam I was receiving, so I have protected this page with a simple calculation exercise. This means that if you want to leave a comment, you'll need to complete the calculation before you hit the Post Comment button.

If you want to object to a comment made by another visitor, be sure to contact me and I'll look into it ASAP. Don't forget to mention the page link, or the QuickDocId of the document.

For more information about the Talk Back feature, check out this news item.