Iis error 500 to Get /HangFire

Tags: #<Tag:0x00007f6a00dd6a50>


Dear, I implemented HangFire in my asp.net webForms.
In development works very well. However, when publishing IIS IIS the following error appears:

JobStorage.Current property value has not been initialized. You must set it before using Hangfire Client or Server API.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

I using:

class Startup (OwinStartup)
class HangfireBootstrapper : IRegisteredObject
class ApplicationPreload : System.Web.Hosting.IProcessHostPreloadClient

Any idea what I did wrong?
Thank you


We started seeing this just today for the restore command in our Azure DevOps pipelines, we have been unable to track down why this started failing

“/home/vsts/work/1/s/Prometheus.MvcTests/Prometheus.MvcTests.csproj” (Restore target) (1) ->
2018-12-04T17:58:01.7102296Z (Restore target) ->
2018-12-04T17:58:01.7102870Z /usr/share/dotnet/sdk/2.1.500/NuGet.targets(114,5): error : Failed to retrieve information about ‘Hangfire.Pro’ from remote source ‘https://nuget.hangfire.io/nuget/hangfire-pro/FindPackagesById()?id=‘Hangfire.Pro’&semVerLevel=2.0.0’. [/home/vsts/work/1/s/Prometheus.MvcTests/Prometheus.MvcTests.csproj]
2018-12-04T17:58:01.7103376Z /usr/share/dotnet/sdk/2.1.500/NuGet.targets(114,5): error : Response status code does not indicate success: 500 (Internal Server Error). [/home/vsts/work/1/s/Prometheus.MvcTests/Prometheus.MvcTests.csproj]