Ravi Vishwakarma is a dedicated Software Developer with a passion for crafting efficient and innovative solutions. With a keen eye for detail and years of experience, he excels in developing robust software systems that meet client needs. His expertise spans across multiple programming languages and technologies, making him a valuable asset in any software development project.
ICSM Computer
18-Jun-2025To send internal (in-app) notifications using SignalR, you can broadcast or send messages to specific users or groups without page reloads.
Here’s a full breakdown of how to implement internal notifications in an ASP.NET Core or ASP.NET MVC + SignalR app:
1. Define a Hub
C# (NotificationHub.cs)
2. Configure SignalR in Startup
ASP.NET Core:
In
Startup.cs:✅ 3. Client-Side JavaScript
HTML + JS:
4. Send Notifications from Backend
Example in a Controller:
5. Make Sure Authentication is Set Up for Targeted Users
For
Clients.User(userId)to work:userIdfromClaimsPrincipal.NameIdentifier.Optional Enhancements