HTTP 400 Bad Request Error When You Access an Exchange 2007 Mailbox
Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.
This topic provides information about how to troubleshoot an error message that Microsoft Outlook Web Access users may experience in a large Microsoft Exchange Server 2007 environment.
When a user tries to access an Exchange 2007 mailbox by using Outlook Web Access, the user receives an error message that resembles the following:
HTTP 400 Bad Request (Request header too long) |
Cause
This issue may occur when both the following conditions are true:
The Exchange 2007 Mailbox server role is hosted on a computer that is running Windows Server 2003.
The user is a member of many groups. For example, the user is a member of over one hundred security groups.
Resolution
Warning
Incorrectly editing the registry can cause serious problems that may require you to reinstall your operating system. Problems resulting from editing the registry incorrectly may not be able to be resolved. Before editing the registry, back up any valuable data.
To resolve this issue, you must modify three Internet Information Services (IIS) 6.0-related registry entries on the following computers:
The Windows Server 2003-based computer that hosts the Exchange 2007 Client Access server role. This computer hosts Outlook Web Access for the affected users.
The Windows Server 2003-based computer that hosts the Exchange 2007 Mailbox server role. This computer hosts the mailboxes for the affected users.
Registry Entries
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters
Value name: MaxClientRequestBuffer
Value type: REG_DWORD
Value data: 32768
Radix: Decimal
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
Value name: MaxFieldLength
Value type: REG_DWORD
Value data: 65534
Radix: Decimal
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
Value name: MaxRequestBytes
Value type: REG_DWORD
Value data: 500000
Radix: Decimal
For More Information
The MaxClientRequestBuffer registry entry limits the response line and header information in an HTTP request. The data that is limited by MaxClientRequestBuffer consists of all data from the first byte of the request through the last byte before the entity body. This data includes the method, the URL, any additional path information, the query string, the HTTP version, all the headers, and the characters that delimit all the parts of the request. In other words, this includes all the data that is not part of the body of the request.
Because IIS 6.0 reads the blocks of the request data into buffers, the limit that is set by MaxClientRequestBuffer may not be exact. Therefore, after you set the MaxClientRequestBuffer registry entry, we recommend that you verify that the actual limit on the size of the client request and on the header fields is what you expected.
The MaxFieldLength registry entry specifies the maximum size of each HTTP request header.
Note
By default, this registry entry is not present.
The MaxRequestBytes registry entry specifies the upper limit for the total size of the request line and the headers. Typically, this registry entry is configured together with the MaxFieldLength registry entry. If the MaxRequestBytes value is lower than the MaxFieldLength value, the MaxFieldLength value is adjusted.
Outlook Web Access logon attempts that specify the /exchange virtual directory are not processed by the Client Access server. Instead, the requests are passed to the Mailbox server. However, Outlook Web Access logon attempts that specify the /owa virtual directory are processed by the Client Access server.
If the registry entries that are mentioned in this article are not set to a high enough value, users who are members of many groups may experience Outlook Web Access logon failures.
For more information about the MaxClientRequestBuffer registry entry, see Microsoft Knowledge Base article 260694, Description of the MaxClientRequestBuffer Registry Value.
For more information about the MaxFieldLength registry entry, see IIS 6.0 MaxFieldLength parameter not set correctly.