I've prepared a sample project based on a self hosted server, a WPF client that works, same code but using a UWP app client on w10 doesn't work, it can't connect. I've checked and granted also permission on the UWP app for internet e private connection, but it still can't connect to the self hosted server. I'm using versione 2.2.0
This scenario is simple to try, can someone please try it and let me know it they can get it working ?
Thanks
I've found other people having troubles with UWP where they cannot resolve dll,
my problem looks different, the app loads and try to connect but it fails on connect
any idea ?
very simple to reproduce :
download the sample from here :
https://code.msdn.microsoft.com/Using-SignalR-in-WinForms-f1ec847b
Using VS2015 add a UWP app, add nuget signalr client and add the similar code as the wpf client sample.
The new UWP app can't connect to the self hosted server.
Can anyone please try this ?
I am able to reproduce this too. The app just hangs on await hubConnection.Start()
and there are no exceptions reported. Full method is:
public async Task Join()
{
var hubConnection = new HubConnection("...");
hubConnection.Error += OnHubConnectionError;
await hubConnection.Start();
}
ditto here. I actually did a blog post on this as a callout that this is caused by .Net Native; if you don't compile for .Net Native, this problem doesn't happen but since apps must compile to .Net Native to submit to store now....
I'm going to give this a shot and see if it solves the problem. Will report back: http://dotnetbyexample.blogspot.com/2015/05/getting-signalr-clients-to-work-on.html
@DamianEdwards ?
I work on the .Net Native compiler team and I'm having trouble reproducing this hang. Please forgive me as I fumble through the SignalR portion of all this and correct me if I've run off course.
Here's my setup:
Results:
When I run the WPF server and the UWP client it works when .Net Native isn't enabled. I'm able to successfully see the client connect on the WPF Server side.
When run with .Net Native enabled I don't see your hang. However, I do hit a PlatformNotSupportedException. The stack looks like this:
01 0b45f6c0 016904af mrt100_app!RhpThrowEx2
02 0b45f6d4 01690381 App1_1380000!$30_System::Threading::Thread.set_CurrentCulture+0x3f
03 0b45f71c 016902fd App1_1380000!$5_Microsoft::AspNet::SignalR::TaskAsyncHelper.RunWithPreservedCulture+0x71
04 0b45f74c 01625332 App1_1380000!$5_Microsoft::AspNet::SignalR::TaskAsyncHelper.RunWithPreservedCulture+0x7d
05 0b45f774 01d66f25 App1_1380000!$5_Microsoft::AspNet::SignalR::TaskAsyncHelper::<>c__DisplayClass2d$1System::__Canon.b__2c+0x72
In fact, the SignalR 2.2 package that I have gets flagged by the static analysis tooling with several other similar warnings:
'System.IAsyncResult System.IO.Stream.BeginWrite(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)' is not yet implemented.
'System.Void System.IO.Stream.EndWrite(System.IAsyncResult)' is not yet implemented.
'System.Void System.Threading.Thread.CurrentCulture.set(System.Globalization.CultureInfo)' is not yet implemented.
'System.Void System.Threading.Thread.CurrentUICulture.set(System.Globalization.CultureInfo)' is not yet implemented.
The reason this can happen is because the non-Native stack runs against CoreCLR and the Native stack doesn't have everything implemented (some for technical reasons, some just as a costing issue). A UWP version of SignalR will need to not rely on the APIs mentioned above otherwise it will hit these exceptions.
Let me know if I've missed anything or just been super confused. Everything but the .Net Native stuff is new to me as of this morning! :-)
Okay... I've made a bit more progress and I think I'm caught up to where @bc3tech is. It seems that I can get a properly targeted SignalR client by building my own as per: http://dotnetbyexample.blogspot.it/2015/05/getting-signalr-clients-to-work-on.html. It works in DEBUG and RELEASE with .Net Native enabled. All that is fine and his PR adds the UWP goo to the project file. Cool. If anyone else sees something amiss when running on .Net Native I'm happy to take a look.
Sorry for the spam.
Fixed in Fixed in 4a46099e9323d3be250bc1f013421ffd10a96397 9e5449bdff81b9f85a9605739651db5d14234c5f be8a4ed8238ec8f5f08fd5fb04a14e35d7ad4145 edeacf4cbadffda58e65452687b793b4a1fea9f5
What is the planned ETA for 2.2.1?
I just ran into this issue and found this thread. To echo @mteper 's question, is there an ETA for 2.2.1 release? Would be great to use this in our app we are going to release this month. @moozzyk
+1!
_Very_ annoying. Can't deploy on the Microsoft Store a Windows 10 app which relies on SignalR...
@bbougot just pull the source and compile it as part of your proj, then
As a stop gap until 2.2.1 is shipped you can use a 2.2.1-pre package from the nightly build - https://myget.org/gallery/aspnetwebstacknightly (you can find links to feeds on the webpage). It contains all the fixes planned for actual 2.2.1 release.
Ok thanks guys!
@moozzyk Thank you. That works.
Does anybody knows when the final version of 2.2.1 will be released?
Most helpful comment
@moozzyk Thank you. That works.
Does anybody knows when the final version of 2.2.1 will be released?