Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

signalr client in hololens to new aspnet core 2.0 signalr possible?

Want to run a .net framework 4.x or 3.x client against a asp.net core 2.0 signalr service. possible?

for now my client is a .net framework 4.x or 3.x console app. eventually it will be a DLL i drop into unity3d plugins directory.

Then i can call my methods like so MyNet4ClientClass.MakeSignalrCoreCall(data).

Is this possible? Can .NET 3.x or 4.x talk to asp.net core 2.0 signalr service?

I tried to add the nuget package for Microsoft.AspNetCore.SignalR 1.0.0-alpha2-final but....

"Could not install package 'Microsoft.AspNetCore.SignalR 1.0.0-alpha2-final'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 0 "

i thought this post was hopeful https://www.rizamarhaban.com/2016/09/13/asp-net-core-signalr-for-windows-10-uwp-app/

in the post the guy talks to signalr code 2.0 from a UWP app the client UWP app uses "Microsoft.AspNet.SignalR.Client": "2.2.1" from nuget

and service which uses Microsoft.AspNetCore.SignalR.Server: 0.2.0-alpha1-22118 obtained from https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json repository

this works its seems because these older SignalR.Server packages still exposes themselves the old signalr way. you can see from the url it exposes at /signalr/hubs

but the new new signalr core changed its protocol sometime so now incompatible.

how can i talk to the new new signalr core from .net framework 4.x or 3.x client running in hololens?

Answers

  • @metadojo,

    I've had luck with a different unity-based client for signalr called BestHttp: https://www.assetstore.unity3d.com/en/#!/content/10872

    I can't remember if the free version includes the signalr bits so you can try it first -- but the pro isn't really that expensive and is pretty handy.

    James

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • thanks James. I dont want to spend 60$ ( already spent $3000 for the hololens dev edition ) to find out it only talks to the original signalr ( not core ). they are not compatible from a messaging perspective.

  • metadojometadojo
    edited December 2017

    see my multi comment summary below....

  • @metadojo,

    I just checked a Unity project I used it, and the server it is talking to is running SignalR.Core v2.2.2. You should be good to go. :)

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • metadojometadojo
    edited December 2017

    Dude, i bought Best HTTP program ($60) but

    --doesnt look like its using ".NET Core 2.0 Signalr"

    --it looks like its using ".NET Signalr 2".

    There's a huge difference.
    The one you are alluding to is not Core.
    it based on the .NET framework 4.6.

    The one im alluding to is the new stripped down .NET called .NET Core. Which runs on linux as well as windows and comes with ASP.net Core and Signalr Core.

    Here is the difference.

    Best HTTP program request from unity....
    HTTP/1.1 GET http://192.168.1.4:5005/chat/negotiate?tid=0&_=2566636909&clientProtocol=1.5&connectionData=[{"Name":"ChatHub"}]

    ".NET Core 2.0 Signalr" hello world console program request.
    HTTP/1.1 GET http://192.168.1.4:5005/chat?id=f78745aa-d21d-4773-9cba-5e27b1fe7b60

    Its a totally different protocol so i dont think you are running anything with the term "Core" in it.

    Here is a package reference for the server side for "Core"
    PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.0.0-alpha2-final"

    Here is a package reference for the client side for "Core"
    PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="1.0.0-alpha2-final"

    ......

    Here is a package reference for the server side Signalr 2.0 in your case.
    PackageReference Include="Microsoft.AspNet.SignalR" Version="2.2.2"

    Here is a package reference for the client side Signalr 2.0 in your case.
    PackageReference Include="Microsoft.AspNet.SignalR.Client" Version="2.2.2"

  • metadojometadojo
    edited December 2017

    Dude, I bought the BestHttp product but its not running SignalR.Core v2.2.2.
    its running SignalR v2.2.2. ( no word "Core" ).

    The word "Core" only comes from the new stripped down .NET framework called .NET Core which currently at version 2.0
    and runs on linux and windows.
    In .NET Core 2.0 they have ASP.net Core and Signalr Core.

    Here is what your package references look like.
    Server: PackageReference Include="Microsoft.AspNet.SignalR" Version="2.2.2"
    Client: PackageReference Include="Microsoft.AspNet.SignalR.Client" Version="2.2.2"

    Here is what my package references look like.
    Server: PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.0.0-alpha2-final"
    Client: PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="1.0.0-alpha2-final"

    Here is what your client sends:
    HTTP/1.1 GET http://192.168.1.4:5005/chat/negotiate?tid=0&_=2566636909&clientProtocol=1.5&connectionData=[{"Name":"ChatHub"}]

    Here is what my client sends:
    HTTP/1.1 GET http://192.168.1.4:5005/chat?id=f78745aa-d21d-4773-9cba-5e27b1fe7b60

    My fault i was desperate I knew it wouldnt work. But i saw the word "Core" in your reponse and been struggling with this for days.
    :(

    In short i suggest to edit your comment because you are not running anything "Core" related.

  • @metadojo,

    If you read the above, I said that HttpPro client is talking to a server that runs this -- https://www.nuget.org/packages/Microsoft.AspNet.SignalR.Core/2.2.2/

    Sorry I missed your point -- or you missed mine -- and sorry you are out $60. And thank you for the abuse, @metadojo. That'll keep me humble.

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • I understand there are fundamental changes in NetCore version of SignalR. They state in this Blog that prior clients are not compatible with the new SignalR server implementation (see the What's Changed section).

    I found this thread searching for if BestHttp is going to release a compatible client so thought I'd add this update.

Sign In or Register to comment.