Read time 5 minutes
Outlook on the web (earlier known as Outlook Web App) is the online version of a desktop Outlook application. If you are working remotely, it will be beneficial to log in to your Exchange account using Outlook on the web. It will retrieve your mailbox with all its folders. But, if it does not find your web address after connecting with the server, it gives a bad request error with the number 400.
"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."
What is an HTTP 400 bad request error?
When the user proxies an HTTP request from an Exchange Server 2013 Client Access Server) or Microsoft Exchange Server 2016 (running client access service) to an older version of Exchange server, then you may get a bad request error, as mentioned 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. Users may often encounter 400 bad requests when entering invalid URLs, outdated cookies and cache files, or a Conditional Access Policy blocking the authentication.
List of 400 client errors
Here are some common “request failed with status code 400” errors that users often face while accessing Exchange Server mailbox.
- HTTP 401 Unauthorized: The error code HTTP 401 or Unauthorized states that the client is deprived of the proper credentials to get access to the server. This can be due to missing, incorrect, or expired credentials being entered.
- HTTP 403 Forbidden: Error HTTP 403 Forbidden is encountered when a user is not provided the requested access even after successful authentication. This happens when the user does not have the required permissions or if the IP address is blacklisted.
- HTTP 404: HTTP request has exceeded the allotted timeout or HTTP 404 error appears when you attempt to move a mailbox from on-premises Exchange to Exchange Online. Users may face this error if ExchangeGUID property of the Exchange Online MailUser object does not match that of the on-premises Exchange.
Resolve the HTTP 400 Bad request issue
To resolve the http status 400 bad request issue, you must remove the user account from multiple Active Directory Groups. Also, increase the MaxFieldLength and MaxRequestBytes subkeys for all Exchange Server 2010 CAS.
Method 1. Change Subkey Parameter
First, we will learn to change the subkey parameter in the Exchange Server 2010.
Step 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
Step 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 |
Step 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. Reduce the number of Active Directory groups
The second method is removing the user account from the different role groups of the Active Directory. 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.
How to remove corruption from Exchange mailboxes?
The above-mentioned methods remove the causes affecting the proxy requests and giving the bad request error 400. But such errors may occur due to the corruption in Exchange mailbox too. The manual methods will not remove the corruption, and the issue will keep affecting Outlook Web Apps. So, you should also scan the EDB file for corruption issues.
Kernel for Exchange Server software is one of the most reliable solutions for the Exchange Server corruption issues. It can access the offline Exchange database files and scan them for any possible corruption. It can access the offline Exchange database files and scan them for any possible corruption. It will recover deleted mailbox in Exchange server back. This Exchange EDB recovery software will show you a clean preview of the recovered data and allow you to save the recovered items in the multiple output formats that are suitable to you.
Conclusion
HTTP 400 Bad Request error can occur when the Exchange 2013/2016 Client Access Server proxies an HTTP request to an older version of Exchange Server. To fix this error, you need to remove the user account from some AD groups or change MaxFieldLength and MaxRequestBytes subkey values for Exchange 2010. You can also use Kernel for Exchange Server recovery solution that helps you handle corrupt and damaged Exchange databases.