I have two web applications in one solution. Lets say they are accessible with these URLs: localhost:1111, localhost:2222.
I have users that can login to both applications, and both applications use same messaging mechanism, same message database.
In messaging mechanism, I use SignalR and show a popup notification about message (just like in any mail client, visually).
When a user messages to other user within same application (e.g localhost:1111 or localhost:2222 doesn't matter), message is sent correctly. This is how I did that, just like in any SignalR template code:
public void NotifyUser(string userId, string message) {
var context = GlobalHost.ConnectionManager.GetHubContext<MyHub>();
context.Clients.User(userId).notify(message);
}
However, when I send messages from User A browsing localhost:1111 to User B browsing localhost:2222, messages don't reach.
- Is this a normal behaviour? Am I expecting too much from SignalR?
- If this issue can be solved, how can I do that? Which point I am missing about SignalR?
Thank you all in advance.