SharePoint 2010: Problems with search result page

Here’s the next SharePoint problem, this time concerning search results. The basis is a fully patched SharePoint 2010 server (September 2014 CU)… Authorizations have broken open on a subsite on a document library and an additional user with reading rights has been added.
This user now wants to use the normal search field in the top right corner list. That won’t work, though. SharePoint will ask for the user’s credentials and then displays an “Access denied”. However, the user has rights to the target page (osssearchresults.aspx)..
I found the solution at “Surya SharePoint Tips”, but I don’t fully agree. In my opinion the problem is that the original page is being edited. So if you update it can happen that it’s being overwritten by the Service Pack / CU and that the problem will simply reoccur.
So I would copy the page and enter the new page as the result page of the website-collection.
So step by step:
1. Create a copy of “C:\Program Files\Common files\Microsoft Shared\web server\Extensions\14\TEMPLATE\LAYOUTS\osssearchresults.aspx” on one of the SharePoint web servers. (name e.g. “osssearchresultsFIXED.aspx”)
2. In the new file:

<%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master"  
Inherits="Microsoft.Office.Server.Search.Internal.UI.OssSearchResults"  
EnableViewState="false" EnableViewStateMac="false"%>

3. change into:

<%@ Page Language=C# MasterPageFile=/_layouts/v4.master  EnableViewState="false" EnableViewStateMac="false" %>

4. copy this file to all web servers into the same folders
5. Then change the value in the field “Site Collection Search Results Page” at http://root/ofthe/SiteCollection/_layouts/enhancedSearch.aspx to the new page (e.g. layouts/OSSSearchResultsFIXED.aspx)
Repeat the last point for every website-collection concerned. This way, there should be no problems after another update.

Leave a Reply

Your email address will not be published. Required fields are marked *