System.IO.InvalidDataException: Invalid negotiation response received

I am coding in Blazor Server using .Net 5 and I am setting SignalR and I am getting the following error when I try to set the Connection on, this line of code errors out connection.StartAsync();

ERROR

System.IO.InvalidDataException: Invalid negotiation response received. ---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 2 | BytePositionInLine: 0. at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at Microsoft.AspNetCore.Internal.SystemTextJsonExtensions.CheckRead(Utf8JsonReader& reader) at Microsoft.AspNetCore.Http.Connections.NegotiateProtocol.ParseResponse(ReadOnlySpan1 content) --- End of inner exception stack trace --- at Microsoft.AspNetCore.Http.Connections.NegotiateProtocol.ParseResponse(ReadOnlySpan`1 content)

connection = new HubConnectionBuilder()
                .WithUrl(nm.ToAbsoluteUri("DataHub"))
                .Build();
            connection.On<string, string, string>("ReceivedSyncRecord", this.OnReceiveSync);
            await InvokeAsync(StateHasChanged);
            await connection.StartAsync();
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum