Reputation: 4846
I have a signalR server running on AspNetCore 2.1.0-preview2-final at https://localhost:44384/chathub
. My web client and dotnetcore console app connects to the server successfully but dotnet4 console app is FAILED.
SignalR server Startup.cs\Configure:
app.UseSignalR(routes =>
{
routes.MapHub<ChatHub>("/chathub");
});
web client running in the same signalR server: SUCCESSFUL
const connection = new signalR.HubConnection(
"/chathub",
{
logger: signalR.LogLevel.Information
});
dotnetcore console app (Microsoft.AspNetCore.SignalR.Client 1.0.0-preview2-final): SUCCESSFUL
_connection = new HubConnectionBuilder()
.WithUrl("https://localhost:44384/chathub")
.WithConsoleLogger()
.Build();
dotnet4 console app (Microsoft.AspNet.SignalR.Client 2.2.3.0): FAILED
hubConnection = new HubConnection("https://localhost:44384/chathub");
hubProxy = hubConnection.CreateHubProxy("ChatHub");
await hubConnection.Start();
The exception is:
StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StreamContent,...
Any idea please?
Upvotes: 0
Views: 354
Reputation: 31610
SignalR 2.2.3 is not compatible with SignalR for ASP.NET Core. You cannot use the old client with the new server or the old server with the new client.
Upvotes: 2