SignalR | SignalR Core support for Microsoft ASP.NET Core Blazor | Frontend Framework library
kandi X-RAY | SignalR Summary
kandi X-RAY | SignalR Summary
This package adds a Microsoft ASP.NET Core SignalR client library for Microsoft ASP.NET Blazor. The package aims to mimic the C# APIs of SignalR Client as much as possible and it is developed by wrapping the TypeScript client by using Blazor's interop capabilities. For more information about SignalR development, please check SignalR documentation.
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
SignalR Key Features
SignalR Examples and Code Snippets
Community Discussions
Trending Discussions on SignalR
QUESTION
I am trying to setup SignalR using Visual Basic. This is very difficult because every example (literally every example) is in C#. I'm doing an okay job getting through conversions, but I am stumped on this:
...ANSWER
Answered 2022-Apr-07 at 15:19Rippo answered this:
QUESTION
I'm trying to use SignalR in my Xamarin Forms project.
It works perfectly when I'm using Android (device or simulator).
But using the same code on iOS, it hangs at await hubConnection.StartAsync();
I'm using Visual Studio 2022. XAML hot reload is disabled. I've tried adding the System.Memory and System.Buffers IncludeAssets None fix.
Here's the code
...ANSWER
Answered 2022-Mar-24 at 14:13Well I had only half of the solution implemented.
What fixed it for me was adding this to BOTH the common AND iOS projects. Not only the common project.
QUESTION
I know there are a lot of questions and answeres regarding this topic out there, but nothing matched my specific issue.
I am using the following versions
- Angular 10.0.14
- @aspnet/signalr 1.0.27
- ASP.NET Core 3.1
VERSION UPDATE:
- I just replaced @aspnet/signalr 1.0.27 by @microsoft/signalr 5.0.11 -> same issue.
The SignalR connection works pretty fine until I add an accessTokenFactory in the Angular frontend.
Frontend
...ANSWER
Answered 2021-Oct-19 at 12:06Browsers do not support headers for websockets, therefore the bearer token has to be added as query string parameter. We hit the maximum length for URLs due to the length of our bearer token. We could shorten our token or use a reference token, see also: https://github.com/aspnet/SignalR/issues/1266
Hope this helps others as well.
QUESTION
I've created TPL Dataflow pipeline as shown below
...ANSWER
Answered 2022-Mar-07 at 18:41If any one looking for the solution. I think the error happens when multiple threads are working together we solved it in a way instead of returning Task Process we changed the method to.
QUESTION
I am running currently a webserver with ASP.NET Core 3.1 and a Blazor project. Recently when upgrading to .NET 6.0 I encountered (even with a blank Blazor project) some problems with a websocket error message in the browser only when deployed on my webserver (see message below).
Locally (on Windows 11 x64, VS 22 Preview 4) there are no error messages...
Webserver: Debian 10 x64, .NET 6.0 SDK installed, running on NGINX with websockets enabled (reverse proxy).
Do I miss out on something or is it a problem with the current state of .NET 6.0 and NGINX? I already tried to access the webpage locally on the debian server and the same error message occurs.
Help would be much appreciated!
Greetings!
Error messages within order:
...ANSWER
Answered 2022-Feb-26 at 12:07Here is the solution described again, maybe a little bit more convenient:
To fix this problem, I changed in the site-configuration (/etc/nginx/sites-available) of nginx the following variables:
QUESTION
So I want to send a message to a specific client via SignalR. That client is not Clients.Caller - currently I can only identify it by let's call it "ID", a property in the context: this.Context.Items["ID"]
So to find a client by its ID, how do I...access all clients or contexts? Or should I save this ID in a different way? This is not the connection ID, it is an ID that maps to something in the database.
Basically I'd like to go Clients.Single(c => c.Items["ID"] == specificId).SendMessage(msg);
ANSWER
Answered 2021-Dec-14 at 11:34You can send the ID down to the clients using context.Clients.User(...)
or context.Clients.All()
. Then in JavaScript, read the ID and compare it to what's on the page. If it's a match, carry out some action; else ignore.
As an example, let's say your app's processing a specific record on an edit screen. The record ID is on the page as a form field. You send a SignalR message down from C# with the ID. You do a comparison in JavaScript between the ID and the form field value; if they match, you display a toaster message, perform other processing, etc.
QUESTION
I have a component library that uses JS code to generate an image as a base64 string and the image needs to be transposed to C#. The image size is larger than MaximumReceiveMessageSize.
Can I get the value of the MaximumReceiveMessageSize property in C#? I need a way to correctly split the picture into chunks, or some other way to transfer it.
My component can be used in a Wasm or Server application. I can't change the value of the MaximumReceiveMessageSize property.
Thanks
...ANSWER
Answered 2022-Feb-21 at 07:30Using a stream as described in the Stream from JavaScript to .NET solved my problem.
From Microsoft docs:
In JavaScript:
QUESTION
I'm doing message forwarding with SignalR. I want to read my multiple Hub classes from config file as my project will be huge. Below is an example MapHub operation, but I want to read the class name from the config.
...ANSWER
Answered 2022-Feb-15 at 10:28You have to use Reflection
here as HubEndpointRouteBuilderExtensions
class doesn't provide a none-generic version of MapHub
method. Below code should work for your scenario.
QUESTION
I am having really weird issues with memory leak and I cannot find source after long hours of testing, debugging and trial/error attempts.
The source of memory leak is reloading object base on push from subject. On which part I load current database values and add it to SourceCache.
This part is getting the push, to initiate reload
...ANSWER
Answered 2022-Feb-09 at 20:56The bug was reported and fixed here in library repository: https://github.com/reactiveui/ReactiveUI/issues/3091
QUESTION
I'm using SignalR for push notifications on my Flutter app and that works ok. I get the message from the backend and show notification using flutter_local_notifications. The problem is that the SignalR service would shut down after some time. How can I make my app stay on in the background? and even start on reboot?
Here's my code:
...ANSWER
Answered 2022-Jan-24 at 09:29SignalR for Flutter uses web sockets and SSE to receive messages from the SignalR service. If the app was terminated because the user restarted their phone or the OS shut down the app to save battery, these push notifications would not be received by the app.
To overcome this, app developers (and SignalR) have to use FCM on Android, and APNs on iOS (or FCM which will also use APNs on iOS). All other approaches will be more limited because the operating systems do not allow users to keep background processes running the entire time. This was actually allowed years ago, but the operating systems have made these changes to save the user battery - they enforce that all apps go through the same push notification medium - FCM on Android, APNs on iOS.
SignalR for Flutter uses neither FCM nor APNs. At it's current state, SignalR is not well suited for Android or iOS - take a look at the comments with people struggling with similar problems to you on How to use signalr in Android.
Alternative solutionThe simplest / easiest way to get started is to use Firebase Cloud Messaging.
- On Android, it will be used directly to send messages to devices, and
- on iOS, FCM will use APNs to reach devices reliably
Caveat: On Android, there is a more complicated alternative called unifiedpush, but the limitations include showing a notification to the user at all times to handle background notifications.
My analysis: This is all done based on my quick investigation by reading the pubspec.yaml
, the GitHub issues on the original repo, the SignalR documentation, and some experience implementing Push Notifications for Flutter.
Disclosure: I just released a push notification library 2 days ago called push
which would be well suited to these types of Push Notification packages making the transformation to using FCM on Android and APNs on iOS. However, as an app developer, in most cases, you should use firebase_messaging
, not push
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install SignalR
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