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!

 

Advertisements

Proxy groups in SharePoint

A Proxy Group is a mechanism which defines the relationship between a web application and the proxy (or connection) for a service application. This proxy enables the web applications associated with the Proxy Group to consume services (Managed Metadata, Search, User Profiles, etc.) from the service application.

By default when you install a new Farm, you will only have one Proxy Group and that group is called “ default”.

Whenever you create a new Service Application in Central Administration, this new service application will automatically be added to this “ Default Proxy Group”. When you create a new service application via PowerShell, the new service application will NOT automatically be assigned to the Default or any other Proxy group.

To see the available Proxy groups in your SharePoint 2013 Farm, you can run the following command in the SharePoint 2013 management shell (run as administrator)

Get‐SPServiceApplicationProxyGroup

And if you want to see them with all service application proxies

Get‐SPServiceApplicationProxyGroup | Format‐Table ‐wrap

To create a new proxy group and define your own name, use the following command;

New-SPServiceApplicationProxyGroup -Name "new name of your proxy group"

A Service Application Proxy can be associated with multiple Proxy Groups using PowerShell. Also, a Proxy Group is NOT required to host each and every available Service Application available within the farm.

In order to associate a Service Application to a proxy via PowerShell . Use Get-SPServiceApplicationProxy
with a where clause to obtain the identity of the service application.

$SAProxy = Get‐SPServiceApplicationProxy | ? {$_.DisplayName ‐eq "Name of Service Application"}

You can then use this variable in the Add-SPServiceApplicationProxyGroupMember cmdlet to add the Service Application’s proxy to the proxy group you want to

Add‐SPServiceApplicationProxyGroupMember "name of proxy group" ‐Member $SAProxy