The base type ‘.Search.UI.SearchResultsLayoutPage’ is not allowed for this page – suddenly in SharePoint 2016, the people search has stopped working, when we have tried to search any users from SharePoint 2016, we got the below error:
“The base type ‘Microsoft.Office.Server.Search.Internal.UI.SearchResultsLayoutPage’ is not allowed for this page. The type Microsoft.Office.Server.Search.Internal.UI.SearchResultsLayoutPage, Microsoft.Office.Server.Search, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c could not be found or it is not registered as safe.”
Reason for the above error or issue:
Recently if you have updated any windows update or security update in SharePoint 2016 or a higher version of SharePoint, we will get into this issue, generally, it started happening after October 2020 windows security update in the server.
Solution: The base type ‘.Search.UI.SearchResultsLayoutPage’ is not allowed for this page
If you google around about this issue, we will get a lot of references to update the web.config file of the issued web application, most people say to add the below entry in the web. config file.
<SafeControls> <SafeControl Assembly="Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.Server.Search.Internal.UI" TypeName="*" Safe="True" /> </SafeControls> <PageParserPaths> <PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="True" IncludeSubFolders="true" /> </PageParserPaths>
However, for us, we just added the below line inside the <safecontrols> tag of the web.config file and it started working:
<SafeControl Assembly="Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.Server.Search.Internal.UI" TypeName="*" Safe="True" />
Note:
- We didn’t add the “<PageParserPath VirtualPath=”/*” CompilationMode=”Always” AllowServerSideScript=”True” IncludeSubFolders=”true” />” tag, still it worked, rather when we tried to add this tag, we endedup with some other error.
Summary
Thus, in this article, we have learned about how to fix the “The base type ‘Microsoft.Office.Server.Search.Internal.UI.SearchResultsLayoutPage’ is not allowed for this page. The type Microsoft.Office.Server.Search.Internal.UI.SearchResultsLayoutPage, Microsoft.Office.Server.Search, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c could not be found or it is not registered as safe.” error.
See Also
You may also like the below SharePoint troubleshooting articles:
- How to fix Open with Explorer issues in SharePoint Online?
- [Fixed]: How to fix No gulpfile found in SPFx framework project
- [Fixed] Error – activate the SharePoint Server Publishing Infrastructure feature in SharePoint Online site
- [Fixed] Server relative urls must start with SPWeb.ServerRelativeUrl”in reading web part properties!
- [Fixed]: The page could not be created. Custom Scripting might be deactivated on the destination site or you might not have sufficient permissions.
- [Fixed] The upgraded database schema doesn’t match the TargetSchema(Failed to upgrade SharePoint Products)
- [Fixed] “Sorry, something went wrong. There was an exception in the Database” (SharePoint Server Error)
- [Fixed] How to fix the “Unexpected response from server. The status code of response is ‘500’ in SharePoint 2016 Search error.”?
- [Fixed] How to fix the wrong tenant credential error in SharePoint online?
- [Fixed] How to fix request timed out error in SharePoint 2016 search (There was no endpoint listening)?
- [Fixed] How to Fix a SharePoint 404 Error in sub site After Restoring a Content Database?
- Overview of search architecture in SharePoint Server