Reputation: 7030
I have hosted ASP NET 4.5 application in Windows Server 2012 R2 (IIS Version 8.5.9600.16384). 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. There is no special sequence or specific page where I am getting this error.
httperr log file shows me an error like
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. Can I do this hotfix for iis 8.5 as well. 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
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
Any help would be appreciated.
Upvotes: 4
Views: 16060
Reputation: 1207
400 Status Code
400 status means “Bad Request”. So this is not a server-side issue. There is something wrong with the request. Is not well-formed before reaching to IIS
If the substatus code was something other than 0, it would be easier to troubleshoot. For example, If it was 1, it would mean “Invalid Destination Header”. If it was 2, that would mean “Invalid Depth Header”. 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. It refers to “The specified network name is no longer available”. After sending the response, IIS waits for ACK package from the client. If the client resets the connection instead of sending this package, IIS logs 64 code since it’s not a graceful connection close.
Check HTTPERR log for the same timestamp. In my case, I saw Timer_EntityBody error which means “The connection expired before the request entity body arrived”.
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. Ideally, a network trace would be very helpful
Source: Status Code 400 with 64 in sc-win32-status column
Upvotes: 0
Reputation: 11
Try adding
EnableViewState="false"
to your aspx page. It looks like Chrome adds the viewstate where IIS expects the request verb.
You might have some luck with this: Fix HTTP.sys
Upvotes: 0