skip to Main Content

SignalR connection works with console app but not with ReactJS

I have the following relevant code on my ASP.NET server: // TrackingHub.cs public class TrackingHub : Hub { public async Task SendLocationData(LocationData locationData) { await Clients.Others.SendAsync("ReceiveLocationData", locationData); Console.WriteLine($"{locationData.Latitude}, {locationData.Longitude}"); } } // Program.cs builder.Services.AddSignalR() builder.Services.AddCors(options => { options.AddDefaultPolicy(builder => {…

VIEW QUESTION
Back To Top
Search