0

I try to connect my WPF application to My Hub On a ASP.NET website. But when i try to connect with this code:

HubConnection connection = new HubConnectionBuilder()
            .WithUrl("https://localhost:5001/matchrchat")
            .Build();

And this is the endpoint of the HUB:

           app.UseEndpoints(endpoints =>
        {
            endpoints.MapHub<MatchrHub>("/matchrchat");
        });

It gives me this Exception: Exception

SignalR Version: 5.0.0

Can someone help me with to understand this exception or knows the solution? i would appreciate that

kris
  • 3
  • 2
  • Can you update to include the versions of the SignalR nuget packages you're using? Along with the target framework of your WPF app – devNull Nov 26 '20 at 14:26
  • Might be, that your code and/or your dependencies need to different versions of `System.Text.Encodings.Web`. Please take a look at [this post](https://stackoverflow.com/questions/5916855/using-multiple-versions-of-the-same-dll). Or didn't you included dependencies while installing SignalR? (e.g. NuGets 'ignore dependencies'?) – nilsK Nov 26 '20 at 16:29
  • Is the hub implemented using ASP.NET Core SignalR or ASP.NET SignalR? – mm8 Nov 26 '20 at 21:10

0 Answers0