I am trying to add an "Advanced Search" web-part to my web-part page. Currently the web part is raising an error object reference is not set to instance of object.

Full stack trace recovered from SharePoint log is shown below:

AdvancedSearchBox class encountered unexpected error: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Office.Server.Search.WebControls.AdvancedSearchBox.GetScopeEnumerator(ScopeInformation & defaultScope)
at Microsoft.Office.Server.Search.WebControls.AdvancedSearchBox.CreateScopeRows(Table parentTable)
at Microsoft.Office.Server.Search.WebControls.AdvancedSearchBox.CreateScopingSectionChildControls(Table parentTable)
at Microsoft.Office.Server.Search.WebControls.AdvancedSearchBox.CreateChildControls(). 813aaaa7-5645-43b5-85ba-e8c67a57997b 03/07/2014 05:40:27.31 w3wp.exe (0x10D8) 0x0BEC SharePoint Server Search Query
dmz8 Unexpected AdvancedSearchBox class encountered unexpected error: System.EventArgs. 813aaaa7-5645-43b5-85ba-e8c67a57997b

Can anyone provide guidance on what I am doing wrong?

  • What version of SharePoint? Is the web part the only one on the page? Mar 8, 2014 at 14:09
  • Version SharePoint 2010. And Yes only one webpart on this page.
    – Jon
    Mar 10, 2014 at 15:27
  • The call stack indicates an issue retrieving scopes? Have you deleted all of them by chance? Can you go to the scopes page in the Search Service Application and get results?
    – CoreyRoth
    May 5, 2014 at 21:20
  • Are u matching the correct web application scope in search settings? Jul 18, 2016 at 5:25
  • Have you configured the search service in central admin? If yes, create a new one and try again.
    – akbar ali
    Nov 2, 2016 at 13:44

1 Answer 1


It looks like search may not properly be setup on your farm. My first recommendation would be to verify that search works. The easiest way, in my opinion to verify search is to add the search results webpart to a page and verify that I can pass in the search query string to get results.


Beyond that, I can't help you too much as we have scripts that setup our search automagically.

Edit: The correct way to pass a search string and get good results in SP is not with a ?, but with a #. Also, there is an out of the box way to double-check search. So, to completely test OotB functionality of search, your url would look something like this:


Your Answer

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

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