Invalid search result URLs prevent items from being opened in IIS7 based servers

When we have discussion list to store many C++ related topics.  Many list items use "C++" as part of their title.
After performing a search of the "C++" keyword in the search centre the results' links for items with C++ in their title.  We a user clicks on the link  he get the "404 error" because the target page cannot be opened. 

Example of search result URL that fails

Why this happens :

The URL from the search result page does not encode the "++". 

IIS 7 by default blocks any url which has special character like “++” in them.

How to fix it:

Applications that require the use of the “+” character in the URL path can disable this validation by setting the allowDoubleEscaping attribute in the system.webServer/security/requestFiltering  configuration section in the application’s web.config.  However, this may make your application more vulnerable to malicious URLs:



            <requestFiltering allowDoubleEscaping="true" />



Comments (0)

Skip to main content