问题描述
正在寻找在Mac上的Visual Studio中设置HangFire仪表板的帮助。”我创建了一个DotNet Framework WebAPI项目。
我在项目中引用了Hangfire.sqlServer,Hangfire和Hangfire.dashboard程序包。在启动过程中,使用以下代码初始化HangFire。
public void ConfigureHangfire(IAppBuilder app)
{
Hangfire.GlobalConfiguration.Configuration
.UsesqlServerStorage("ConnectionString",new sqlServerStorageOptions
{
QueuePollInterval = TimeSpan.FromSeconds(60),UseRecommendedisolationLevel = true,disableGlobalLocks = true
}).UseConsole();
JobStorage.Current = new sqlServerStorage("ConnectionString");
app.UseHangfireServer();
app.UseHangfireDashboard("/jobs",new DashboardOptions()
{
Authorization = new[] { new AuthenticatedAuthorizationFiler() }
},JobStorage.Current);
//Called to simulate a test job run
BackgroundJob.Enqueue(() => Debug.WriteLine("Hello world from Hangfire!"));
}
我用以下内容装饰了我的入门班: [assembly:OwinStartup(typeof(Project.App_Start.Startup))]
当我导航到我的 / jobs 网址时,找不到404页面。我也尝试过。我引用了Microsoft.Owin,它在我的bin文件夹中。
我已经设置
<appSettings>
<add key="owin:AutomaticAppStartup" value="true" />
</appSettings>
我已遵循此处提供的文档:https://docs.hangfire.io/en/latest/getting-started/aspnet-applications.html编写启动代码。我不太确定为什么我无法进入仪表板页面进行“ hangfire”。
在这里找到我的问题的任何帮助将不胜感激!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)