Monitor Work from Home Employees with Employee Desktop Live Viewer.

Read More

How to fix the “HTTP 400 Bad Request” error in Exchange Server Environment?

Aftab Alam Aftab Alam Updated On - 08 Apr 2020

"This error (HTTP 400 Bad Request) means that Internet Explorer was able to connect to the web server, but the webpage could not be found because of a problem with the address."

When the user proxies an HTTP request from an Exchange Server 2013 Client Access Server) or Microsoft Exchange Server 2016 (running client access service) or to an older version of Exchange server, then you may get a bad request error like the above.

Mostly this issue is found in Exchange Server 2016 (Enterprise & Standard Edition), Exchange Server 2013 (Enterprise & Standard Edition), and Exchange Server 2010 (Standard & Enterprise) environments.

Also, Exchange Server 2013 Client Access server show 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.Wingtiptoys.com,/owa/,,Negotiate,True,WINGTIPTOYS
\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,WINGTIP-E2K13,400,400,,GET,Proxy,wingtip-e2k10.wingtiptoys.com,14.03.0123.000,IntraForest,WindowsIdentity-ServerCookie,Server~WINGTIP-E2K10.Wingtiptoys.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();

Moreover, the Exchange Server 2010 and Exchange Server 2007’s Client Access Server may have the following error message in their HTTPERR logs:

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 –
Cause of the HTTP 400 Bad Request Error

The cause of the error is the presence of your account in the multiple Active Directory Groups. The error may occur in the proxy request form the Client Access Server of Exchange Server 2016 or 2013 to that of Exchange Server 2010.

Resolve the HTTP 400 Bad Request Issue

To resolve the issue, you need to remove the user account from multiple Active Directory Groups. Also, increase the MaxFieldLength and MaxRequestBytes subkeys for all Exchange Server 2010 CAS.

Method 1

First, we will learn to change the subkey parameter in the Exchange Server 2010.

  1. Go to each Exchange Server 2010 Client Access Server and try to locate the following subkey;
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
  2. Check the MaxFieldLength and MaxRequestBytes entries and change the value in their tables:
    Value Name Value Type Value Data Value Base
    MaxFieldLength DWORD 65536 Decimal
    MaxRequestBytes DWORD 65536 Decimal
  3. Restart the Client Access Server and try to run the proxy process again.

NOTE:

  • If you do not find the entries for the MaxFieldLength or MaxRequestBytes, then create these entries manually.
  • Increasing the values of these entries will allow larger HTTP packets to be sent to IIS and will cause the Http.sys to use more memory. It may further increase the chances of malicious malware and spyware attacks.
Method 2

The second method is removing the user account from the different role groups of the Active Directory. A a user account can be a member of multiple groups. The Bad Request error occurs when a user account that is running the proxy service is a member of multiple groups.

You can remove the user account from the group using the Exchange Shell cmdlets. Here is the example –

Remove-ADGroupMember -Identity <RoleGroupName> -Members <AccountName>

Example –

Remove-ADGroupMember -Identity Networking -Members Jonathan

The command will remove the account name Jonathan from the Networking Role Group.

The above two methods are a workaround that may allow you to run the proxy services from Exchange Server 2013 and 2016. However, apart from this error, Exchange environment is vulnerable to corruption issues and server crashes. If you do not want to face any grave situation, then you should have a professional tool to handle a corruption of EDB files or Exchange Server crashes. Kernel for Exchange Server is one such software that will allow you to fix any Exchange database corruption and recover any lost data.

Kernel for Exchange Server

Kernel for Exchange Server is a top-rated Exchange Recovery software for the Exchange Server corruption issues. It can access the offline Exchange database files and scan them for any possible corruption. It will retrieve both corrupt and deleted items back. It will show you a clean preview of the recovered data and allow you to save the recovered items in the multiple output formats suitable to you.