Open Closed

SignalR event all pages - Blazor #1147

User avatar
Leonardo.Willrich created
  • ABP Framework version: v4.2.3 rc.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:


I need to hook up a SignalR event for every single page in my application. I was thinking to do that on the Layout page by method OnIntiliaze. However, the Layout code is not available, it is implemented in one of the NuGet packages and the only way to do that is by extending the razor component in my project and then creating the method.

I wonder if there is another way to do that?

In this scenario, the back-end will send a notification (disk full for example), and a toast/modal notification will be shown for users. Is there some example of how to do implement that?

2 Answer(s)
  • User Avatar
    liangshiwei created
    Support Team


    Better way is to overriding the layout:

    Is there some example of how to do implement that?

    No such example,you can refer the Use ASP.NET Core SignalR with Blazor document You can poll the signalr hub for disk information, and notify if the disk is full.

  • User Avatar
    Leonardo.Willrich created

    Thank you for you answer liangshiwei.

    I've overriden the code as per documentation. I just affraid getting issues when updating the framework. It would be awesome having a callback function to onInitialize where we can create instances and hook up that to the main application.

Made with ❤️ on ABP v8.0.0 Updated on September 27, 2023, 12:25