SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to use the web API to access search results from MS Search Server 2010 Express. When I execute the query I get the following error and stack trace.

Server was unable to process request. ---> Exception from HRESULT: 0x80131904 ---> Exception from HRESULT: 0x80131904

Server stack trace: at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at ----.OnCore.Portal.WebApplication.MS.Search.QueryServiceSoap.Query(QueryRequest request) at ----.OnCore.Portal.WebApplication.MS.Search.QueryServiceSoapClient.CoreSite.OnCore.Portal.WebApplication.MS.Search.QueryServiceSoap.Query(QueryRequest request) in C:----\OnCore\Source\Portal\Portal.WebApplication\Service References\MS.Search\Reference.cs:line 207 at ----.OnCore.Portal.WebApplication.MS.Search.QueryServiceSoapClient.Query(String queryXml) in C:----\OnCore\Source\Portal\Portal.WebApplication\Service References\MS.Search\Reference.cs:line 213 at ----.OnCore.Portal.WebApplication.Controllers.SearchController.Index(String searchTerms) in C:----\OnCore\Source\Portal\Portal.WebApplication\Controllers\SearchController.cs:line 28

The code I'm using to the make the call looks like:

    QueryServiceSoapClient queryService = new QueryServiceSoapClient("QueryServiceSoap");
    string query = GetSearchXML(searchTerms);
        string queryResults = queryService.Query(query);
    catch (Exception ex)
        throw ex;

The query XML looks like:
<QueryPacket xmlns="urn:Microsoft.Search.Query">
  <Query xmlns="">
      <QueryText language="en-US" type="STRING">OSS</QueryText>

When I enter the same search term through the Search Center UI, I get the expected results. I have verified that the service accounts have access to the database. Any suggestions on how to troubleshoot this problem would be appreciated.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.