Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Hangfire Exception: Async void methods are not supported #4090


User avatar
0
ajayak created

I switched to Hangfire for BackgroundJob. On enqueuing a background job, I get this error

Async void methods are not supported. Use async Task instead.

Here is the code:

public override async void Execute(long userId)
        {
            await DeleteWebhooks(userId);
        }

It works fine with default BackgroundJob manager


1 Answer(s)