HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.43k stars 1.71k forks source link

ServiceLocator.Current.GetInstance<T> return null #2390

Open dsalla opened 7 months ago

dsalla commented 7 months ago

Hello,

I was using version 1.6.17 and the Service Locator always normally returned an instance for ISessionProperties in the sessionProperties variable in the attached image.

After updating to the latest version and without any changes to the source code, the return is always null. nullreferenceexception

The MWAgendamento() method is triggered via RecurringJob recurringjob01 recurringjob02

Someone help me please ? I'm desperate for a solution because I didn't find anything in the releases regarding changes to dependency injection.

Thanks.