TF31002: Unable to connect to this Team Foundation Server

Note: The information in this article applies to Team Foundation Server 2010.

Full error:
TF31002: Unable to connect to this Team Foundation Server: 'Your TFS Server'.
Team Foundation Server Url: 'Your TFS Server URL'.
 
Possible reasons for failure include:
- The Team Foundation Server name, port number or protocol is incorrect.
- The Team Foundation Server is offline.
- Password is expired or incorrect.
To resolve the problem, verify that you are using the correct URL for your Team Foundation Server.

If you're using Visual Studio 2010 or Team Explorer, you can use https://tfsXX.discountasp.net:443/tfs/ where "tfsxx" is the Team Foundation Server for your account.

For previous versions of Visual Studio, you'll need to append the Team Project Collection name to the URL. Please use the following resources for further information:
In some cases, configuring an outside service or a different application to connect to your Team Foundation Server will also result in the error. In some cases, you may need to add the Team Project Collection name to the URL so you can use https://tfsXX.discountasp.net:443/tfs/YourTeamProjectCollection where "tfsxx" is your Team Foundation Server and "YourTeamProjectCollection" represents your Team Project Collection name.