我们遇到Team Foundation Server的问题。 “HTTP代码400:错误请求”错误消息显示在Visual Studio中的各个位置(请参阅附件中的屏幕截图)(例如,在单击“待更改”,“源代码管理资源管理器”,“获取最新版本等...”之后)。
我们公司有3名开发人员。错误消息是随机的,有时它工作,然后出现错误消息...或者错误消息只出现在计算机1和计算机2上。第三台计算机没问题。第二天,开发人员1没问题,另外两个有错误信息......
我们的环境:
客户端:3x PC,Visual Studio Professional 2015,Windows 10
TFS服务器:Win2012 R2,TFS 2015 Update 3
SQL Server:SQL 2012 std
附件:
从wireshark登录:
Hypertext Transfer Protocol
POST /tfs/defaultcollection/Services/v3.0/LocationService.asmx HTTP/1.1\r\n
[Expert Info (Chat/Sequence): POST /tfs/defaultcollection/Services/v3.0/LocationService.asmx HTTP/1.1\r\n]
[POST /tfs/defaultcollection/Services/v3.0/LocationService.asmx HTTP/1.1\r\n]
[Severity level: Chat]
[Group: Sequence]
Request Method: POST
Request URI: /tfs/defaultcollection/Services/v3.0/LocationService.asmx
Request Version: HTTP/1.1
User-Agent: Team Foundation (devenv.exe, 14.102.25619.0, Pro, SKU:31)\r\n
X-TFS-Version: 1.0.0.0\r\n
Accept-Language: cs-CZ\r\n
X-TFS-Session: eb5ed6e7-04ea-4ae5-8444-211cd145a568, Connect\r\n
X-VSS-Agent: TFS: af687f1c-d07d-42ca-b185-15a5a10d20ca\r\n
Content-Type: application/soap+xml; charset=utf-8\r\n
SOAPAction: "http://microsoft.com/webservices/Connect"\r\n
Host: tfssrv:8080\r\n
Content-Length: 244\r\n
[Content length: 244]
Expect: 100-continue\r\n
Accept-Encoding: gzip\r\n
Connection: Keep-Alive\r\n
\r\n
[Full request URI: http://tfssrv:8080/tfs/defaultcollection/Services/v3.0/LocationService.asmx]
[HTTP request 1/3]
[Response in frame: 1933]
[Next request in frame: 1935]
File Data: 244 bytes
eXtensible Markup Language
<s:Envelope
xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Body>
<Connect
xmlns="http://microsoft.com/webservices/">
<connectOptions>
1
</connectOptions>
<lastChangeId>
331005
</lastChangeId>
<features>
1
</features>
</Connect>
</s:Body>
</s:Envelope>
Hypertext Transfer Protocol
POST /tfs/defaultcollection/Services/v3.0/LocationService.asmx HTTP/1.1\r\n
[Expert Info (Chat/Sequence): POST /tfs/defaultcollection/Services/v3.0/LocationService.asmx HTTP/1.1\r\n]
[POST /tfs/defaultcollection/Services/v3.0/LocationService.asmx HTTP/1.1\r\n]
[Severity level: Chat]
[Group: Sequence]
Request Method: POST
Request URI: /tfs/defaultcollection/Services/v3.0/LocationService.asmx
Request Version: HTTP/1.1
User-Agent: Team Foundation (devenv.exe, 14.102.25619.0, Pro, SKU:31)\r\n
X-TFS-Version: 1.0.0.0\r\n
Accept-Language: cs-CZ\r\n
X-TFS-Session: a5d31d36-1b78-4602-b765-e2a7082abef9, Connect\r\n
X-VSS-Agent: TFS: af687f1c-d07d-42ca-b185-15a5a10d20ca\r\n
Content-Type: application/soap+xml; charset=utf-8\r\n
SOAPAction: "http://microsoft.com/webservices/Connect"\r\n
Host: tfssrv:8080\r\n
Content-Length: 244\r\n
[Content length: 244]
Expect: 100-continue\r\n
Accept-Encoding: gzip\r\n
Connection: Keep-Alive\r\n
\r\n
[Full request URI: http://tfssrv:8080/tfs/defaultcollection/Services/v3.0/LocationService.asmx]
[HTTP request 2/2]
[Response in frame: 695]
File Data: 244 bytes
Hypertext Transfer Protocol
HTTP/1.1 400 Bad Request\r\n
[Expert Info (Chat/Sequence): HTTP/1.1 400 Bad Request\r\n]
[HTTP/1.1 400 Bad Request\r\n]
[Severity level: Chat]
[Group: Sequence]
Request Version: HTTP/1.1
Status Code: 400
Response Phrase: Bad Request
Content-Type: text/html; charset=us-ascii\r\n
Server: Microsoft-HTTPAPI/2.0\r\n
Date: Mon, 31 Oct 2016 13:23:34 GMT\r\n
Connection: close\r\n
Content-Length: 326\r\n
[Content length: 326]
\r\n
[HTTP response 2/2]
[Time since request: 0.000720000 seconds]
[Prev response in frame: 692]
[Request in frame: 694]
File Data: 326 bytes
Line-based text data: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">\r\n
<HTML><HEAD><TITLE>Bad Request</TITLE>\r\n
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>\r\n
<BODY><h2>Bad Request - Invalid Verb</h2>\r\n
<hr><p>HTTP Error 400. The request verb is invalid.</p>\r\n
</BODY></HTML>\r\n
要缩小问题范围,您可以尝试重置IIS服务器。如果您使用任何代理,请尝试删除代理,然后重试。还要检查TFS服务器上的事件视图,以查看是否有任何相关的故障排除信息。
根据您的错误截图和错误ID TF400813。下次无法通过VS连接到TFS时,可以尝试以下操作:
我遇到了这个问题,发现应用程序层已经被破坏了。
我们遇到了同样的问题。我们通过名称(tfs.domain.com)访问了服务器,团队的一些成员主要在签到时遇到了很多错误。我们通过其IP地址更改了服务器的名称,并且它工作正常。
这听起来很奇怪,因为我们能够从浏览器访问http://tfs.domain.com,但Visual Studio TFS有问题。
客户端解决方案
如果解决方案在修复TFS服务器后仍然存在,请尝试以下步骤。
- 以管理员身份打开Visual Studio。
- 从Team Menu打开源代码管理资源管理器。
- 选择工作区的下拉列表并编辑或创建新工作区。
- 在驱动器中创建一个新文件夹并附加到新工作区(在步骤3中创建)
- 现在您的TFS服务器文件夹显示所有项目。
- 从源头开始获取最新信息。
希望你的错误消失。
注意: - 在步骤1之前重新启动Visual Studio。