SignalR-samples | Samples for ASP.NET Core SignalR | Testing library
kandi X-RAY | SignalR-samples Summary
kandi X-RAY | SignalR-samples Summary
Samples for ASP.NET Core SignalR
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of SignalR-samples
SignalR-samples Key Features
SignalR-samples Examples and Code Snippets
Community Discussions
Trending Discussions on SignalR-samples
QUESTION
The question in a sentence: Are SignalR connections kept open via keep-alives, if so, why aren't they working in .NET Core 3, and if not, what are the keep-alive settings for?
I have an ASP.NET Core 3.0 MVC web application, and I just added SignalR to it following the getting started tutorial located here: https://docs.microsoft.com/en-us/aspnet/core/tutorials/signalr?view=aspnetcore-3.0&tabs=visual-studio (minus creating a new web app, we just added it to our app instead)
I have a simple hub, and the client connects successfully, and if I test the SignalR method immediately after the connection is established, it works. However, the connection is closed if I don't use it for 30 seconds. If I'm understanding the documentation, the default value for keepalive is 15 seconds, but I don't see any keepalive messages. I have tried various settings for KeepAliveInterval and ClientTimeoutInterval, but nothing has resolved this.
I added .withAutomaticReconnect() to the HubConnectionBuilder call in our javascript, and that does work to re-establish the connection after the disconnect every 30 seconds. Is that how this is supposed to work, or should the connection be kept alive with pings and only have to reconnect due to network dropouts/etc.? I feel I'm missing something simple or I'm misunderstanding how this should work.
Here are the various pieces of our code:
Startup.cs ConfigureServices method:
...ANSWER
Answered 2019-Nov-10 at 12:48I think you may also need to add options.Transports like this
QUESTION
Working in VS 2019.
Im new to SignalR, I have written Hub/Client apps which I cannot get working over my local home LAN using two PC's on different IP's.
So I went back to basics and loaded the sample chat apps but I have the same problem.
Im using the Demo Chat samples from github here
PC A (my work PC) working as a SignalR Hub running the Chat Hub (192.168.0.2).
PC B (my Laptop) running the Chat 'Windows Forms Sample' Client (192.168.0.9)
Firewalls: I have allowed both Inbound and Outbound Rules for port 52995 on both PC's.
The Hub connection:
...ANSWER
Answered 2019-Jul-29 at 06:57Answering my own question...
My use case is a bit different.
I need to run the server hub on a windows 10 PC with a no more that a dozen or so local (LAN) clients (so its all local LAN, no cloud) . Kestral seems to be the server to use in this case.
I learned IIS Express only handles localhost traffic.
For testing I was running a copy of Visual Studio in a VitrualBox vm (for the server hub) this meant VS was using IIS Express and therefore no traffic outside of localhost allowed & therefore the 400.
To get it to work
Use the CLI to start the web app - this will use Kestral as the sole web server (normally IIS proxies http traffic to/from Kestral)
QUESTION
In the following solution link SignalR is installed version 1.0.1
SignalR does not appear in the list of NuGet packages so I don't know how to upgrade it. It appears under SDK -> Microsoft.AspNetCore.App (2.1.1)
so it is installed as a dependency of that.
I tried upgrading it by installing latest SignalR using NuGet but the code does not pick up the latest version. I know this because when I control click a SignalR type it opens a new file where it says it is using: Assembly location: C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.signalr.core\1.0.1\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Core.dll
How to upgrade SignalR in this scenario?
...ANSWER
Answered 2019-Mar-08 at 17:30Try deleting the the signalR .dll files from the NugetFallbackFolder, I would then expect it to look for the relevant .dll files in the non-fallback folder
QUESTION
My ASP.NET Web API (target framework: .NET Framework 4.6.2) project frequently loses connection with Azure SignalR service (free tier). I have followed the example as shown in aspnet ‘chatroom’ example.
My client application is based on Angular JS. Messages are being send to the clients but after a few hours, the server connection with Azure SignalR service is lost and is not established again.
As far as I understand from the MS Azure SignalR Internals documentation:
If a server connection is disconnected for network issue,
- the server connection starts reconnecting automatically.
The following error is returned back in response:
Azure SignalR Service is not connected yet, please try again later
However, this does not seem to be happening i.e. server connection with Azure SignalR service is not established again.
nuget
packages:
- Microsoft.AspNet.SignalR v2.4.0
- Microsoft.AspNet.SignalR.Core v2.4.0
- Microsoft.AspNet.SignalR.SystemWeb v2.4.0
- Microsoft.Azure.SignalR.AspNet v1.0.0-preview1-10317
- Microsoft.Azure.SignalR.Protocols v1.0.6
ANSWER
Answered 2019-Feb-21 at 04:45Have you added error handling code in your client like below-
QUESTION
I have a signalr (.Net Core version) hub that returns a stream of data using IObservable. This is pretty much lifted directly from this streaming sample: https://github.com/radu-matei/signalr-samples/tree/master/streaming/web
...ANSWER
Answered 2018-Jan-23 at 12:04If you're doing it the same way as in the sample you linked, this should do it:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install SignalR-samples
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page