Skip to content

Dashboard websocket doesn't connect #323

@jkhalaf-gr

Description

@jkhalaf-gr

Hello

On https://localhost:port/tickerq-dashboard/, this is what I see:

Image

In chrome's console I see:

Failed to load resource: the server responded with a status of 405 ()

In the network tab, I see the request is going to:

https://localhost:7121/tickerq-dashboard/ticker-notification-hub/negotiate?auth=eGFCTTRVblahblah3U5WU1uTXc2R0E0ZEVtYlZLdDRFN0REMg%3D%3D&negotiateVersion=1

And it returns a 405 response.

In Program.cs I have:

// production configuration with ef core persistence
builder.Services.AddTickerQ(options =>
{
  options.SetMaxConcurrency(0);

  options.AddOperationalStore<GrDbContext>(efOpt => { efOpt.CancelMissedTickersOnAppStart(); });

  options.AddDashboard(dashboardOpt =>
  {
    dashboardOpt.BasePath = "/tickerq-dashboard";
    dashboardOpt.EnableBasicAuth = true;
  });
});

And then later down in the file, I have:

app.UseHttpsRedirection();

app.MapStaticAssets();

app.UseRouting();

app.UseSession();

app.UseAuthentication();

app.UseAuthorization();

app.Use(async (context, next) =>
{
  if (context.Request.Path == "/")
  {
    context.Response.Redirect("/board");
    return;
  }

  await next();
});

// activate tickerq job processor
app.UseTickerQ();

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions