-
Notifications
You must be signed in to change notification settings - Fork 10k
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
@aspnet/signalr - Unable to receive a message sent to concrete client #17106
Comments
First question I have to ask, how do you know you have a valid connection Id? |
Good question I could say. I am caching the connections to the memory cache and also logging the disconnected users via |
And you're using |
Exactly. |
I can't think of anything that would be wrong from the info provided. Would it be possible for you to make a minimal repro app and put it on github? |
If you send a message directly to |
@halter73, No. I am not able to send any message to anyone from I wrote an integration test, which shows exactly the same behavior. I am able to send a message, when I target all of the clients, but not able, when I select exact client. Therefore we are eliminating the possible issues in my client application and @aspnet/signalr library. |
@BrennanConroy, Is there a small app with |
Sure, I created a super simple 3.0 app that sends to |
Good job @BrennanConroy ! I have tested it and it is working perfectly. I created another branch in your repo, where I cached in the memory the connections in I noticed that you are using |
Using @aspnet/signalr shouldn't cause any issues. I switched the sample to @aspnet/signalr@1.1.4 and it continued working as expected.
What isn't working? You probably wont be able to send a message to the specific client that is closing because it is in the process of shutting down. Could you please provide a sample app that shows these things not working properly? |
@BrennanConroy , thank you one more time for taking the time to help me. |
Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue. This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue! |
Describe the bug
I am unable to receive a message sent from AspNetCore WebApi via
Microsoft.AspNetCore.SignalR
Hub to concretely targeted client.The issue I am encountering exists only, when I am trying to send the message to single client:
await Clients.Client("Valid connection Id").SendAsync("Client message", response);
I am successfully sending the same message passing the same flow, when sending it to all of the clients:
await Clients.All.SendAsync("Client message", response);
To Reproduce
The code pictures are just examples of what I am trying to do.
Back-end AspNetCore side
Front-end Angular side
Further technical details
netcoreapp3.0
10.16.3
8.3.6
1.1.4
dotnet --info
Microsoft Visual Studio Community 2019 - 16.3.5
The text was updated successfully, but these errors were encountered: