cannot connect to hub. I am using Angular to connect to my SignalR Hub that is wrote in C# (ASP NET CORE 7)
this is the frontend code :
this.connection = new HubConnectionBuilder()
.withUrl("https://localhost:5168/hub-chat",{
skipNegotiation: true,
transport: signalR.HttpTransportType.WebSockets
})
.build();
and this is backend code configuration
var connectionString = configuration.GetSection(nameof(RedisOptions)).GetChildren().ElementAt(0).Value;
services.AddSignalR(options =>
{
options.EnableDetailedErrors = true;
options.KeepAliveInterval = System.TimeSpan.FromMinutes(10);
}).AddStackExchangeRedis(connectionString);
and mapping for hub
builder.MapHub<ChatHub>("hub-chat");