Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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);
    try
    {
        string queryResults = queryService.Query(query);
    }
    catch (Exception ex)
    {
        throw ex;
    }

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

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

 
discard

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

Browse other questions tagged or ask your own question.