简体   繁体   English

HTTP 错误 400:请求动词在 IIS 8.5 中无效

[英]HTTP Error 400 : The request verb is invalid in IIS 8.5

I have hosted ASP NET 4.5 application in Windows Server 2012 R2 (IIS Version 8.5.9600.16384).我在 Windows Server 2012 R2(IIS 版本 8.5.9600.16384)中托管了 ASP NET 4.5 应用程序。 But once in a while I am getting an error like Bad Request - Invalid Verb HTTP Error 400. The request verb is invalid while going from one page to another.但是偶尔我会收到一个错误,比如 Bad Request - Invalid Verb HTTP Error 400。从一个页面转到另一个页面时,请求动词无效。 There is no special sequence or specific page where I am getting this error.没有出现此错误的特殊顺序或特定页面。

httperr log file shows me an error like httperr 日志文件向我显示了一个错误,例如

2015-01-21 04:48:18 MyIP 55452 ServerIP 80 - - - 400 - Verb -
2015-01-21 04:48:20 MYIP 55454 SerevrIP 80 - - - 400 - Verb -

I checked this post http://support.microsoft.com/kb/828726 but here it is applicable for Microsoft Internet Information Services (IIS) 6.0.我检查了这篇文章http://support.microsoft.com/kb/828726但这里它适用于 Microsoft Internet Information Services (IIS) 6.0。 Can I do this hotfix for iis 8.5 as well.我也可以为 iis 8.5 做这个修补程序吗? I have searched about this issue over the internet but could not get substantial information.我在互联网上搜索过这个问题,但无法获得大量信息。 So, can anyone help me resolve this issue.那么,谁能帮我解决这个问题。

Using Fiddler I got the Raw Data of the request as使用 Fiddler 我得到了请求的原始数据

POST http://example.com/Project.aspx?prj=5566 HTTP/1.1
Host: example.com
Connection: keep-alive
Content-Length: 30634
Cache-Control: max-age=0
Authorization: Negotiate 
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: http://example.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://example.com/Project.aspx?prj=5566
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Cookie: ASP.NET_SessionId=4oymd5odmcaluiuzc24tbx22; _gat=1; _ga=GA1.2.1888408676.1418017144

The Request Filtering Setting of Windows Server 2012 R2 is Windows Server 2012 R2 的请求过滤设置为

在此处输入图像描述

Any help would be appreciated.任何帮助,将不胜感激。

Try adding尝试添加

EnableViewState="false"

to your aspx page.到您的 aspx 页面。 It looks like Chrome adds the viewstate where IIS expects the request verb.看起来 Chrome 添加了 IIS 期望请求动词的视图状态。

You might have some luck with this: Fix HTTP.sys您可能对此有一些运气: Fix HTTP.sys

400 Status Code 400 状态码

400 status means “Bad Request”. 400 状态表示“错误请求”。 So this is not a server-side issue.所以这不是服务器端的问题。 There is something wrong with the request.请求有问题。 Is not well-formed before reaching to IIS在到达 IIS 之前格式不正确

If the substatus code was something other than 0, it would be easier to troubleshoot.如果子状态代码不是 0,则更容易排除故障。 For example, If it was 1, it would mean “Invalid Destination Header”.例如,如果为 1,则表示“无效的目标标头”。 If it was 2, that would mean “Invalid Depth Header”.如果它是 2,那将意味着“无效的深度标题”。 Here is the full list of status codes .这是状态代码的完整列表

If you see value 64 in sc-win32-status, it means there is a network-related issue.如果您在 sc-win32-status 中看到值 64,则表示存在与网络相关的问题。 It refers to “The specified network name is no longer available”.它指的是“指定的网络名称不再可用”。 After sending the response, IIS waits for ACK package from the client.发送响应后,IIS 等待来自客户端的 ACK 包。 If the client resets the connection instead of sending this package, IIS logs 64 code since it's not a graceful connection close.如果客户端重置连接而不是发送此包,IIS 会记录 64 代码,因为它不是正常关闭连接。

Check HTTPERR log for the same timestamp.检查 HTTPERR 日志以获取相同的时间戳。 In my case, I saw Timer_EntityBody error which means “The connection expired before the request entity body arrived”.就我而言,我看到 Timer_EntityBody 错误,这意味着“连接在请求实体主体到达之前已过期”。

Recommendations建议

  • Check if there are software like antivirus or network endpoint protection in the server.检查服务器中是否有防病毒或网络端点保护等软件。 Uninstall them and monitor the system for a while to see if the issue occurs again (Note: disabling them sometimes doesn't mean they don't run in the background anymore. Uninstalling is the ultimate way of eliminating them from the troubleshooting process)卸载它们并监视系统一段时间以查看问题是否再次出现(注意:有时禁用它们并不意味着它们不再在后台运行。卸载是从故障排除过程中消除它们的最终方法)

  • Work with the third-party product support to see if there is anything blocking the requests to be fully sent.与第三方产品支持合作,查看是否有任何东西阻止请求完全发送。 Application might be initiating the connection but not completing it应用程序可能正在启动连接但未完成连接

  • Check with your Networking team to analyze the network between the web server and client.请与您的网络团队联系以分析 Web 服务器和客户端之间的网络。 Ideally, a network trace would be very helpful理想情况下,网络跟踪将非常有帮助

Source: Status Code 400 with 64 in sc-win32-status column来源: sc-win32-status 列中的状态码 400 和 64

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM