Using hangfire in

Hi All,

I am new to HangFire and trying to implement hangfire in legacy code (web forms). I am using below code in new class file called startup.vb

Imports Hangfire
Imports Hangfire.SqlServer
Imports Microsoft.Owin
Imports Owin

<Assembly: OwinStartup(GetType(Global.Startup))>

Namespace Global

Public Class Startup

    Public Sub Configuration(app As IAppBuilder)
        Dim options = New DashboardOptions With {.AppPath = VirtualPathUtility.ToAbsolute("~")}
        app.UseHangfireDashboard("/hangfire", options)
    End Sub

End Class

End Namespace

I am getting 404 for http://localhost:2141/hangfire. Please help me if I am missing something.

I have looked at all the documents but could find anything helpful. Any help is appreciated.

Thanks :slight_smile:

Hello, if you haven’t figured it out yet, your fixed code is above… Note that the call to UseSqlServerStorage just needs the NAME of the connection string, the actual string as returned by ConfigurationManager.

Hope this helps!