Getting Started with .NET MAUI and SignalR: Real-Time Chat App

Gerald Versluis · 33K views · 2022 · 20:13

Open on YouTube

Software architecture & designWeb developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering questions about connecting a .NET MAUI app to SignalR for live updates or push-style messaging.

Recommended by 2 people across 2 different months, 2022 to 2022.

What it is

A 20-minute tutorial by Gerald Versluis that builds a simple real-time chat app using .NET MAUI as the client and an ASP.NET SignalR server. It explains what SignalR is, sets up the server hub, builds the MAUI UI, wires up chat messaging and runs the demo.

What people said

Recommends Dinesh Falwadiya · 2022-09 · Stack Overflow · on “.net Maui background data fetching no page refresh”

You can use one of the below options Use MessagingCenter [LINK] which works on the publishing & subscribe technique. Use Delegates [LINK] which helps us to share references of methods, which you use to update the details. Use SignalR [this video] , This video explains how to use SignalR.

Recommends H.A.H. · 2022-11 · Stack Overflow · on “How to send push notifications to a Blazor Maui application from backend Server”

I would recommend this : [this video] To be honest, there is no much difference in connecting to SignalR from MAUI, than any other .NET application. (Just keep an eye, what is run on main thread, and what not.)

Cites Leszek Jezierski · 2022-08 · Stack Overflow · on “ASP.NET WebForms - VB.NET and SignalR”

If this helps, I have a working client code (for testing purposes) in VB.NET WinForms app. (My Hub is in C#): Hub (ASP.NET Core in net5.0 - created using Gerald Versluis' tutorial: [this video] ): using Microsoft.AspNetCore.SignalR; using System; using System.Threading.Tasks; namespace SignalR.Hubs; public class OneHub : Hub { public async Task SendMessage(Message message) { Console.WriteLine($"{message.SentDateTime} Sender : {message.SenderId} - {message.MessageText}"); await Clients.All.SendAsync("MessageReceived", message); } } WinForms (net4.8): Imports Microsoft.AspNetCore.SignalR.Client Imports SignalRWinForms.Client.Messaging.Models Public Class Form1 Private connection As HubConnection Su