"An invalid request URI was provided" error when using Azure search provider

  • Search queries against Azure Search might fail with similar errors in the logs:
    Exception: System.InvalidOperationException
    Message: An invalid request URI was provided. The request URI must either be an absolute URI or BaseAddress must be set.
    Source: System.Net.Http
       at System.Net.Http.HttpClient.PrepareRequestMessage(HttpRequestMessage request)
       at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
       at Sitecore.ContentSearch.Azure.Http.HttpClientWrapper.Get(String requestUri, IEnumerable`1 headers)
       at Sitecore.ContentSearch.Azure.Http.SearchServiceClient.Search(String expression
       at Sitecore.ContentSearch.Azure.Http.CompositeSearchService.Search(String expression)
    ...
    Exception: System.InvalidOperationException
    Message: This instance has already started one or more requests. Properties can only be modified before sending the first request.
    Source: System.Net.Http
    ...

Applies to:

CMS 8.2 Update-6 - 9.0 Update-2

CMS 9.1 Initial Release

January 14, 2021
January 18, 2021

Reference number:

210950

Keywords: 

  • Search and Indexing