Manish Kumar
Manish Kumar

Reputation: 53

Using SignalR in UWP application

I have created an UWP application with multiple functionalities. A component of the application uses SignalR for communication. The application is running successfully locally and on some other machines but for one particular system when I deployed it and used the functionality which uses SignalR the app got crashed silently without error.

From the logs, I can see that the last call that the application made was

try{
    conn = new HubConnection(BaseUrl);
      proxy = conn.CreateHubProxy("hubName");
      conn.Start(new LongPollingTransport()).Wait();
    await proxy.Invoke("OpenPortReading");
}
catch(Exception ex)//No exception catched here
{
}

After running the last line shown above the app got crashed without exception

Thanks in Advance

Upvotes: 1

Views: 2834

Answers (2)

Manish Kumar
Manish Kumar

Reputation: 53

The issue was not with SignalR, The application was crashing because of a UI issue due to an unsupported windows version.

Upvotes: 1

imsanjaysc
imsanjaysc

Reputation: 101

SignalR client is basically installed into your Universal App by running the following package install commands (or using the NuGet GUI)

Install-Package Microsoft.AspNet.SignalR.Client
Install-Package PropertyChanged.Fody

There is an excellent post here with step by step.

http://blog.chrisbriggsy.com/SignalR-Win10-IoT/

I do not think it is easy to get the server side of SignalR to run on Windows IoT yet. It is possible to get the server going with Xamarin Mono on Debian with NoWin HTTP Server. The issue is that SignalR requires to run a dedicated HTTP server and that is not possible on the Core version because of sandboxing... (but maybe that will change or there seem to be some hacks floating about)

Source: https://raspberrypi.stackexchange.com/questions/42089/using-signalr-client-in-uwp-running-on-windows-iot

Upvotes: 0

Related Questions