The other day one of my customers was testing remote access to a web application via the Web Application Proxy (WAP). Everything seemed to working except some reports. These generated “HTTP Error 400. The request URL is invalid”. Given that the reports worked well inside the corporate network it pointed to an issue with the WAP.

Further investigation revealed that the requested URL for that generated the error was unusually long (approximately 500 characters).

The WAP uses HTTP.sys under the hood. HTTP.sys is a kernel-mode device driver that first drew breath in IIS 6.0 (shipped with the now unsupported Windows Server 2003).

As it turns out HTTP.sys imposes a 260 character limit on URLs. Fortunately, this limit is configurable by modifying the registry, as described in the following KB article:

3 Comments

Kevin says:

Jeoffrey says:

We had the same issue on our end.. Error 400 on certain requests. First I installed the KB3042127 hotfix you also mentioned in another article however this didn’t work. Then I figured it may be related to the long URL’s and I found this article.

The Registry key fixed our problems with Atlassian Jira not working correctly through the Web Application Proxy. Many thanks!