0

Having this issue since couple days. Search was working fine before that. Getting below error.

enter image description here

I already tried couple things from some posts.

Added the following to the web.config file.

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"

SafeControl Assembly="Microsoft.Office.Server.Search, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.Server.Search.Internal.UI.SearchAdministration" TypeName="*" Safe="True"

PageParserPath VirtualPath="/searchadministration.aspx" CompilationMode="Always" AllowServerSideScript="true"

Still no luck accessing the search service to perform a crawl since list and site search not getting any results back. any help is appreciated.

6
  • Have you added those SafeControls to the web.configs on all SharePoint servers? Oct 2, 2022 at 16:19
  • I added only one one front end for testing. where the CA was started. Do i need to add on all the front end web.configs? OR all the servers i have including app server.
    – Ashok
    Oct 3, 2022 at 17:55
  • I imagine it needs to be added to all SharePoint servers but particularly those serving end user requests. Oct 3, 2022 at 21:13
  • Callum, i have added on all the front end servers this time, but of no luck. Any other ideas you have?
    – Ashok
    Oct 5, 2022 at 0:14
  • An IIS reset might be required on the servers, since the web.config has changed. Oct 5, 2022 at 9:06

2 Answers 2

0

Please try to add the following line into the central administration web site web.config:

<SafeControl        
   Assembly="Microsoft.Office.Server.Search, Version=15.0.0.0,        
   Culture=neutral, PublicKeyToken=71e9bce111e9429c"        
   Namespace="Microsoft.Office.Server.Search.Internal.UI"        
   TypeName="*" 
/>
    
<PageParserPath        
   VirtualPath="/searchadministration.aspx"        
   CompilationMode="Always" AllowServerSideScript="true"        
/>

Remember to add < /> to the code. Reference: Search not working in SharePoint 2019

4
  • Amy thanks for your reply. I already added the suggested lines in the CA web.config file. But of no luck. Is there anyything else you can suggest. I did add < /> AS WELL.
    – Ashok
    Oct 3, 2022 at 17:54
  • It is recommended to modify Version=15.0.0.0 to Version=16.0.0.0 and try it out. Oct 4, 2022 at 2:19
  • Amy, i have tried adding the suggested version as well but of no luck, any other suggestions. thanks
    – Ashok
    Oct 5, 2022 at 0:14
  • You can try again according to the method provided in this article: global-sharepoint.com/sharepoint-2/… Good luck! Oct 20, 2022 at 8:55
0

In case anyone is looking for the answer, you need to just add the single line below to between the safecontrols tags of all web.config files, then recycle the application pools in IIS. Note that the version number is 16, not 15.

<SafeControl Assembly="Microsoft.Office.Server.Search, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.Server.Search.Internal.UI" TypeName="*" Safe="True" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.