Solve HTTP 400 Bad Request Error in Exchange Server 2019, 2016, 2013, 2010
Summary: “This HTTP 400 Bad Request error means that web browser was unable to connect to the web server, but the web page could not be found due to an address problem.”
When a proxies user requests an HTTP from the Exchange Server Client Access 2013 server or from Microsoft Exchange Server 2016 (running the Client Access service) or to an older version of the Exchange server, a malformed request error occurs.
This HTTP 400 Bad Request error mainly occurs in Exchange Server 2016 (Enterprise & Standard Edition), Exchange Server 2013 (Enterprise & Standard Edition), and Exchange Server 2010 (Standard & Enterprise) environments.
Also, the Exchange Server 2013 Client Access server displays the following in the Exchange logs ( <Exchange Server Install Path>\Logging\HttpProxy\<Http resource>)
2014-07-24T16:56:17.806Z,ddf5379e-4a97-4833-b331-36328b9f8b58,15,0,913,7,,Owa,outlook.xyz.com,/owa/,,Negotiate,True,XYC \user003,,Sid~S-1-5-21-3205615561-4199783494-2467053687-1128,Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729),192.168.137.113,XYZ-E2K13,400,400,, GET,Proxy,XYZ-e2k10.xyz.com,14.03.0123.000,IntraForest,WindowsIdentity-ServerCookie,Server~XYZ-E2K10.xyz.com~1937997947~07/24/2014 17:01:18,,,0,342,1,,4,14,,0,,0,,0,0,,0,46.8744,0,,,,18,0,1,0,0,1,38,1,20,20,20,24,43,,,BeginRequest= 2014-07-24T16:56:17.759Z;CorrelationID=;ProxyState-Run=None;ProxyToDownLevel=True;BeginGetResponse=2014-07-24T16:56:17.791Z;OnResponseReady=2014-07-24T16:56:17.806Z; EndGetResponse=2014-07-24T16:56:17.806Z;ProxyState-Complete=ProxyResponseData;EndRequest=2014-07-24T16:56:17.806Z;,WebExceptionStatus=ProtocolError;ResponseStatusCode=400;WebException =System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at Microsoft.Exchange.HttpProxy.ProxyRequestHandler.<>c__DisplayClass2a.b__28();
Additionally, the HTTPERR login on the Client Access server for Exchange Server 2010 and Exchange Server 2007 may contain the following error message:
2014-07-24 16:48:06 192.168.137.113 53335 192.168.137.110 443 HTTP/1.1 GET /owa/ 400 – RequestLength – 2014-07-24 16:48:06 192.168.137.113 53335 192.168.137.110 443 HTTP/1.1 GET /owa/ 400 – FieldLength –
Exchange Mailbox Recovery Software is designed to help repair Exchange Server mailboxes from dismounted and offline EDB files. Users can repair and restore all data items such as emails, contacts, calendars, tasks, notes, journals stored in EDB file of all mailboxes.
Reason of HTTP 400 Bad Request Error in Exchange Server
The reason for the error is that the account exists in many Active Directory groups. An error may occur in requesting a proxy from Exchange Server 2016 or 2013 Client Access Server to Client Access Server 2010 Exchange Server.
Solutions to Fix Exchange Server HTTP Bad Request Error
To resolve this issue, you need to remove the user account from multiple Active Directory groups. Also, increase the MaxFieldLength and MaxRequestBytes subkeys for each 2010 Exchange Server CAS.
Solution 1: Change Subkey Parameter
First, learn how to change subkey parameters in Exchange Server 2010.
1. Navigate to all Client Access 2010 Server Exchange Server and find the following subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
2. Check for MaxFieldLength and MaxRequestBytes entries to change values in tables:
Value Name | Value Type | Value Data | Value Base |
MaxFieldLength | DWORD | 65536 | Decimal |
MaxRequestBytes | DWORD | 65536 | Decimal |
3. Please Restart the Client Access Server and try the Proxy Process again.
NOTE:
- If you cannot find the MaxFieldLength or MaxRequestBytes entries, create them manually.
- Increasing the value of these entries will allow more HTTP packets to be sent to IIS and cause Http.sys to use more memory. It can further increase the likelihood of malicious and spyware attacks.
Solution 2: Remove User Account from Group
The second solution is to remove user accounts from various Active Directory rolegroups. User accounts can be members of multiple groups. The HTTP 400 Bad Request Error occurs when the user account running the proxy service is a member of multiple groups.
You can use Exchange Shell cmdlets to remove user accounts from groups. Here is an example:
Remove-ADGroupMember -Identity-Members
This command removes User’s account name from rolegroup.
Conclusion
Both of the above solutions helps to run the proxy service from Exchange Server 2013 and 2016. These solutions fix the HTTP 400 Bad Request error in Exchange Server 2019, 2016, 2013, 2010.