Internal Server Exception

When searching on the site contoso were getting the following error message:-

Internal Server Exception

 

We checked the ULS Logs and see the following details:-

+++

11/15/2011 15:29:38.62 w3wp.exe (0x08A4) 0x0418 SharePoint Server Search Query dk9x High SearchServiceApplicationProxy::GetLocationConfigurations--Error occured: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The service implementation object was not initialized or is not available. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.InvalidOperationException: The service implementation object was not initialized or is not available.    at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)     at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)     at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)     at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)     at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)). a5728fb7-752e-4db0-9639-15a0ae7e4729

11/15/2011 15:29:38.63 w3wp.exe (0x08A4) 0x0418 SharePoint Server Search Query fm9a Unexpected 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) a5728fb7-752e-4db0-9639-15a0ae7e4729

11/15/2011 15:29:38.68 w3wp.exe (0x08A4) 0x0418 SharePoint Server Search Query g1j9 Exception 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) a5728fb7-752e-4db0-9639-15a0ae7e4729

 

+++

We reset the Application Pool for the SecurityTokenServiceApplicationPool  manually, No Luck

Checked the service app it was broken it had Search Service Application Proxy missing. (Some one deleted it accidently)

The same error can be reproduced if we delete the Search Service Application Proxy

We created a new Search Service Application and re-entered the password for SecurityTokenServiceApplicationPool

Issue Resolved