我按照此链接中的 T 说明进行操作。但我不断收到错误消息:
Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: Invalid negotiation response received.
System.IO.InvalidDataException: Invalid negotiation response received.
---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
Microsoft.Identity 和 SignalR 在 Blazor 应用程序上协同工作似乎存在问题。更多信息可以在这里找到:Blazor Server 和 SignalR 以及 Azure AD ...事实证明我只需要添加:
[AllowAnonymous()] //TODO: authorize...
public class SignalrHub : Hub
{
希望它对某人有帮助:)