Async deadlock issues using Splunk Client with ASP.NET

I have created C# .net code which uses the Splunk.Client v2.2.2.
When I execute that code via a console app it works fine
When I execute that code via an ASP.NET controller / Action, the async Splunk methods get stuck.

My research about this suggests that there are deadlock issues when async / await calls in ASP.NET run as they cause blocking issue with the SynchronizationContext

To get around this I was hoping to use synchronous methods calls with Splunk, however there are only async methods available.

Can anyone suggest how I can solve this problem?
Is there another Splunk library/client that I can use which has synchronous methods?

Tags (2)

Path Finder

It may be late but I tried the selected answer here and it works

0 Karma

If anyone is interested, my work-around for this issue is to use the REST API and orchestrate the creation of a Search Job, Checking the status and retrieving the search results.