Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Xamarin and SignalR cannot connect

$
0
0

Hello Everyone,

I'm having a strange issue with Xamarin, I am trying to connect it to my SignalR Server hosted in Azure however when I call StartAsync() on my connection it seems to just hang - I don't get any errors or crashes. Does anyone know why Its doing thi?

My Code:
`connection = new HubConnectionBuilder()
.WithUrl("MYURL", options =>
{
options.AccessTokenProvider = () => Task.FromResult("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IjcxZjE4YWFkLWM1NmItNDU3Yi05NzE5LWY2ZDg0YmRjMjdjYiIsIm5iZiI6MTU0NzgyMzEyMSwiZXhwIjoxNTUzMDA3MTIxLCJpYXQiOjE1NDc4MjMxMjF9.QMKN2kn0Rqvnt7lGaZAu1rSgncuLdOy7ioEArQa-FZw");
})
.Build();

try
{
await connection.StartAsync(); <-- This is where the code gets to then hangs.
}
catch (Exception ex)
{
throw ex;
}`

I have tried break pointing through the program and it always hits StartAsync() and then just hangs.

Any help would be appreciated!

Thanks,
Joe


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>