Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not reciving messages with Microsoft.AspNet.SignalR.Client in client .Net Core 2.0 #4103

Closed
geomcr opened this issue Apr 30, 2018 · 9 comments
Labels
more-info-needed We are currently waiting for a response. No further triage action is needed at this time.

Comments

@geomcr
Copy link

geomcr commented Apr 30, 2018

Hi,

I have a SingalR server with .Net Framework 4.5.2, and a SignalR Client ( Console Application) with .Net Framework 4.5.2 using:

Server:
image

Client:
image

All of them are working fine since months ago.

But currently I have another SignalR client in a .Net Core 2.0 Console Application using the same version of Microsoft.AspNet.SignalR.Client. It is connecting fine, but is not reciving messages from the hub connection. Is there any issue with this nuget in .Net Core?

This is the code:

        var hubProxy = hubConnection.CreateHubProxy("MyHub");

        hubProxy.On("created", data =>
        {
            Console.WriteLine("Incoming Created  data: {0}", data);
        });

        hubProxy.On("deleted", data =>
        {
            Console.WriteLine("Incoming Deleted data: {0}", data);
        });

        hubConnection.Start().ContinueWith(x =>
        {
            hubProxy.Invoke("subscribe", "firstFeature", "secontFeature");
        }).Wait();

        Console.WriteLine("Connected to {0}", hubConnection.Url.ToString());

Thanks!

@Ryujose
Copy link

Ryujose commented May 2, 2018

Hello @georginacm

Try to do the question here https://github.com/aspnet/SignalR this repository is the one related to signalR net core.

Regards.

@geomcr
Copy link
Author

geomcr commented May 2, 2018

Hi!

I already did it: aspnet/SignalR#2156 and they redirected me here...

@analogrelay
Copy link
Contributor

You are in the correct repo. So to clarify, since you brought up .NET Core, does this only fail when the SignalR client is used from a .NET Core application? I.e. does the same code work in .NET Framework?

Can you post an example that reproduces the issue?

@analogrelay
Copy link
Contributor

Closing this as we haven't heard from you. Please feel free to comment if you're able to get the information we're looking for and we can reopen the issue if we're able to identify the problem.

@analogrelay analogrelay added the more-info-needed We are currently waiting for a response. No further triage action is needed at this time. label Sep 24, 2018
@amccool
Copy link

amccool commented Sep 27, 2018

I would like to re-open this issue, as I nearly the exact scenario and "probably" the same failure.

net461 server running Microsoft.AspNet.SignalR" Version="2.2.3"
net461 client running Microsoft.AspNet.SignalR.Client" Version="2.2.3"

all is wonderful, connected with websockets, does a invoke (call it subscribe or join group), gets data.

but if I change the client project from
<TargetFramework>net461</TargetFramework>
to
<TargetFramework>netcoreapp2.0</TargetFramework>

I can get connected, but only with SSE, and I mostly get InvalidOperation exceptions when invoke is called. Occasionally the invoke succeeded, but its unclear the scenario for success.

@analogrelay
Copy link
Contributor

Can you enable the client-side logging described in our documentation and attach the logs here? (Please do not just copy-paste them in, please drag and drop the file on to the comment to attach it as a separate file, the logs are large and putting them in the comment body makes it very difficult to review).

Also, if you can post a sample application that reproduces the issue that would help.

@amccool
Copy link

amccool commented Oct 8, 2018

looks like I had a load balancer issue. The connection was being made to one server, but invoke was going to a different server. LB in question was an F5 big-ip, it needed default persistence setup.

@analogrelay
Copy link
Contributor

The connection was being made to one server, but invoke was going to a different server

This should be fine in ASP.NET SignalR as long as you have a backplane registered. See the scale-out documentation here: https://docs.microsoft.com/en-us/aspnet/signalr/overview/performance/scaleout-in-signalr

@amccool
Copy link

amccool commented Oct 11, 2018

I dont have a backplane, and dont want one. Each Server was supplied with a eventsource of equal data. the group membership was the key fault that was corrected by getting the client to the right server.

I am pretty sure I can leave this closed. the dotnet core client using the framework signalr.client is working properly for me with 3 servers after the load balancer persistence change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-info-needed We are currently waiting for a response. No further triage action is needed at this time.
Projects
None yet
Development

No branches or pull requests

4 participants