forked from HangfireIO/Hangfire
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreadme.txt
61 lines (49 loc) · 1.8 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Please see https://docs.hangfire.io for more information on using Hangfire. The
`Hangfire` meta-package is using SQL Server as a job storage and intended to run
in any OWIN-based web application when targeting full .NET Framework, or ASP.NET
Core web application on .NET Core.
+-----------------------------------------------------------------------------+
| !!! DASHBOARD REQUIRES AUTH CONFIGURATION !!! |
+-----------------------------------------------------------------------------+
By default, ONLY LOCAL requests are allowed to access the Dashboard. Please
see the `Configuring Dashboard authorization` section in Hangfire documentation:
https://docs.hangfire.io/en/latest/configuration/using-dashboard.html#configuring-authorization
Sample ASP.NET Core Startup class
---------------------------------
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Hangfire;
namespace MyWebApplication
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddHangfire(x => x.UseSqlServerStorage("<connection string>"));
services.AddHangfireServer();
}
public void Configure(IApplicationBuilder app)
{
app.UseHangfireDashboard();
}
}
}
Sample OWIN Startup class
-------------------------
using Hangfire;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(MyWebApplication.Startup))]
namespace MyWebApplication
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
GlobalConfiguration.Configuration
.UseSqlServerStorage("<name or connection string>");
app.UseHangfireDashboard();
app.UseHangfireServer();
}
}
}