Forum Visual Studio

SignalR, Xamarin and Visual Studio for Mac 2019

Anyone here have any luck getting signalR to work in a Xamarin Crossplatform application using VS for Mac 2019? I have been trying to build a chat app using signalr and can't seem to get a connection to the hub started. I have checked, modified and re-checked my code several times. I have used my machine ip address, 10.0.2.2 and localhost:5000 for android and can't get the connection started on the android side (IOS returns the same error).
The returned error is: System.Net.Sockets.SocketException: Connection refused
I have used signalr in some other asp.net web apps before but no luck with VS for Mac. After looking around in this forum and others- there are several fixes and hacks and I at this point think that it is something simple that I am missing.
You can only deploy to azure using VS for mac and I feel that If I could deploy the solution's web app to my host- I would be able to get it to work.
I am going to continue to work on it- I was just wondering if anyone else has had any success getting signalR working using visual studio for Mac because there seems to be no tut's or videos where VS for mac is being used. Thanks in advance!

Best Answers

  • TruciferTrucifer ✭✭
    Accepted Answer

    I was not able to successfully get signalR to connect using my ip address, 10.0.2.2 or localhost:5000... I went ahead and deployed the application to Azure and then I was able to get it to connect with no issues.

Answers

  • TruciferTrucifer Member ✭✭
    Accepted Answer

    I was not able to successfully get signalR to connect using my ip address, 10.0.2.2 or localhost:5000... I went ahead and deployed the application to Azure and then I was able to get it to connect with no issues.

Sign In or Register to comment.