WAP and long URLs bad combination

Hello folks,

The other day we started an scenario were the Web Application Proxy (WAP) was involved, we needed to publish a web application trough it. Internally everything was working fine, but suddenly we realized that when a user was trying to access outside from the network and was using the WAP to access to the WebApp, we were receiving an error line “The Resquest URL is invalid”. So we know that the error was in the WAP and not in the WebApp, so we started to investigate the error.

We came into a KB article (https://support.microsoft.com/en-us/kb/820129) where it claims that it is not possible to have an url larger than 260 characters, in our case the query has 322, so we were over passing the limitation… ouch!

Luckily, we found a way to solve the problem, it is possible to increase the limit, in this case, we need to edit the windows registry in order to accept url longer than 260. To do that we need to:

  1. Open regedit in the WAP
  2. Navigate to HKEY_LOCAL_MACHINESystemCurrentControlSetServicesHTTPParameters
  3. Create a UrlSegmentMaxLength DWORD and set it to 500 (or the value yo need)
  4. Reboot the server

After doing this, we were able to navigate to all the pages in the web application and execute the different querys we have

Hope it helps!

 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s