Greetings,
I have OWIN working with Sitecore but I cannot seem to get the dashboard to load. Here is my OWIN Startup class. I was able to confirm OWIN was working by having it write some test string to the response. It was able to work.
One thing worth noting is that Sitecore requires that the default MVC route be removed from the RouteConfig.
public class OwinStartup
{
public void Configuration(IAppBuilder app)
{
GlobalConfiguration.Configuration.UseSqlServerStorage("connectionStringName");
app = app.UseHangfireServer();
app = app.UseHangfireDashboard("/hangfire", new DashboardOptions()
{
AuthorizationFilters = new[] { new UnrestrictiveAuthorizationFilter() }
});
}
}
public class UnrestrictiveAuthorizationFilter : Hangfire.Dashboard.IAuthorizationFilter
{
public bool Authorize(IDictionary<string, object> owinEnvironment)
{
// In case you need an OWIN context, use the next line,
// `OwinContext` class is the part of the `Microsoft.Owin` package.
//var context = new OwinContext(owinEnvironment);
// Allow all authenticated users to see the Dashboard (potentially dangerous).
//return context.Authentication.User.Identity.IsAuthenticated;
return true;
}
}