title: Search broken in SharePoint 2010
body: <p>Search in SharePoint throws an error, <code>NullReferenceException</code>, whether using the Search box on a normal page or even just loading the Advanced Search page.</p>
  <p>I was originally getting <code>System.ServiceModel.ServerTooBusyException</code> and Round Robin Service Load Balancer <code>EndpointFailure</code> errors in the SharePoint ULS logs whenever I tried to search.  I examined IIS and determined that the Web Apps existed.  I stopped and started the Search Query and Site Settings Serviec on the server.  That was the last I saw of the <code>EndpointFailure</code> and <code>ServerTooBusyException</code> errors.</p>
  <p>However, a new error showed up.  This time is was a <code>System.NullReferenceException</code> from <code>SetPropertiesOnQueryReader()</code> at <code>CoreResultsWebPart.OnInit()</code>.  KB Article 976462 looked promising, until further research showed that it adds the <strong>AllowInsecureTransport</strong> property in the <strong>SecurityBindingElement</strong> class, and changes the value from its default of <em>False</em> to <em>True</em>.  However, this property exists and is already set to <em>True</em> in my environment.</p>
  <p>I found <a href="https://sharepoint.stackexchange.com/questions/5238/sharepoint-2010-error-when-searching-in-coreresultswebpartoninit">this same problem</a>, however deleting the Search Service Apps and Proxies, recreating them and performing an <code>IISRESET</code> did not fix my problem.</p>
  <p>When the Advanced Enterprise Search page is brought up, an error is returned to the screen: <code>Object reference not set to an instance of an object</code>.</p>
  <p>This is the log entry out of the ULS:</p>
  <blockquote>
  <p>CoreResultsWebPart::OnInit: Exception initializing: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader() at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e)</p>
  <p>Internal server error exception: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader() at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e) System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader() at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e)</p>
  </blockquote>