0
northgale created
How to synchronize SignalR boilerplate notification to windows form? this is my code on the desktop side. I've tried that notification working fine on the web side. Here is my code, can someone help me? I installed the signalR on windows form using NuGet package
public async void createConnection()
{
string link = ConfigurationManager.AppSettings["linkWeb"];
var hubConnection = new HubConnection(link);
hubConnection.TraceLevel = TraceLevels.All;
hubConnection.TraceWriter = Console.Out;
IHubProxy stockTickerHubProxy = hubConnection.CreateHubProxy("abpCommonHub");
stockTickerHubProxy.On("getNotification", stock => show("UserId:" + stock));
await hubConnection.Start();
await stockTickerHubProxy.Invoke("register");
}
public void show(string temp)
{
MessageBox.Show(temp);
}
1 Answer(s)
-
0
Hi,
Notifications are sent to subscribed users mostly. How do you login from WPF application. Maybe that is related why you dont get notificaitons.
Can you try to implement this scenario with a simple "Hello world" message broadcasting hub ? In that case we will be sure it's not related to user id.