Open Closed

Chat Module not working for Blazor Server in v9.1.3 #10313


User avatar
0
brauerj@gc.adventist.org created

I ran the following

abp new MyReport.MainApp -u blazor-server -csf --version 9.1.3 --theme basic -t app-pro

Then opened the solution in ABP Studio and added the Chat module Then ran and opened the site, and gave permission to admin, then enabled all of the features. But still nothing shows.

I had a previous ticket submitted but none of the AI answers were sufficient and I wasn't able to provide code in time. Just running the built in from nothing seems to suggest that Blazor Server isn't supported?

Here is the demo project code for reference https://github.com/brauerj-gc/ABPBlazorServerChatModuleTest

Thanks,

Jonathan


4 Answer(s)
  • User Avatar
    0
    brauerj@gc.adventist.org created

    I confirmed that 10.0.2 worked (on Blazor Server) after adding and running a migration.

  • User Avatar
    0
    brauerj@gc.adventist.org created

    Ok I got it running on 9.1.3 the same way. Creating and running a migration

  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    1. The behavior you’re seeing is expected
      When you add the Chat module to an existing solution (including Blazor Server, 9.1.3 or 10.x), ABP does not automatically create database tables for the module. Until you:
    • add a migration for the Chat module’s entities, and
    • apply that migration to the database

    …there will be no chat-related data in the DB, so the UI will appear “empty” even if permissions & features are all enabled.

    That’s why it “started working” for you on both 9.1.3 and 10.0.2 right after you created and ran a migration.


    1. What’s needed to make Chat work after adding the module

    Here is the complete checklist for others hitting the same problem on Blazor Server, v9.1.3:

    A. Ensure EF Core integration for Chat is referenced

    In your *.EntityFrameworkCore project, make sure you have the Chat EF Core package and module dependency:

    using Volo.Chat.EntityFrameworkCore;
    
    namespace MyReport.MainApp.EntityFrameworkCore;
    
    [DependsOn(
        // ... other dependencies
        typeof(ChatEntityFrameworkCoreModule) // important
    )]
    public class MyReportMainAppEntityFrameworkCoreModule : AbpModule
    {
    }
    

    If the NuGet isn’t present, add:

    dotnet add MyReport.MainApp.EntityFrameworkCore package Volo.Chat.EntityFrameworkCore
    

    (or via ABP Studio’s “Add NuGet Package” UI).

    B. Make sure the Chat DbContext is included in the main DbContext

    If your solution uses a single DbContext (the default for app-pro templates with -csf), the Chat module will plug into the same context via the ChatEntityFrameworkCoreModule. Just ensure you haven’t disabled/overridden its configuration.

    C. Add and run a migration

    From the *.EntityFrameworkCore project folder:

    dotnet ef migrations add Added_Chat_Module -c MyReportMainAppDbContext
    dotnet ef database update -c MyReportMainAppDbContext
    

    Or use Package Manager Console:

    Add-Migration Added_Chat_Module -Project MyReport.MainApp.EntityFrameworkCore -StartupProject MyReport.MainApp.Blazor
    Update-Database -Project MyReport.MainApp.EntityFrameworkCore -StartupProject MyReport.MainApp.Blazor
    

    Alternatively, if your solution uses a DbMigrator project and you’ve added Volo.Chat.EntityFrameworkCore & module dependency there too, you can run:

    dotnet run --project MyReport.MainApp.DbMigrator
    

    D. Verify connection strings

    The Chat tables will be created in the connection used by your DbContext (usually "Default"). Ensure the same connection string is used by:

    • *.Blazor (Blazor Server app), and
    • *.EntityFrameworkCore / *.DbMigrator

    so you’re updating the same database the app is reading.

    E. Permissions & features

    You already did this, but for completeness:

    1. As admin, go to Administration → Identity → Roles → admin

      • Grant Chat-related permissions (look for Chat group and enable all).
    2. Go to Administration → Features (on the tenant/edition where applicable)

      • Enable all Chat features (e.g. enable chat, history, etc).

    After the migration is applied and features/permissions are enabled, the chat UI will show up and function on Blazor Server 9.1.3, as you’ve confirmed.


    If you like, I can give you exact commands/projects using your ABPBlazorServerChatModuleTest naming pattern, but the essential fix is: install Chat EFCore module → add migration → update database.


    Sources

    • Chat Module docs (general usage & setup; includes EF Core integration info):
      https://abp.io/docs/latest/modules/chat

    • ABP Framework GitHub (Chat module & EF Core integration source):
      https://github.com/abpframework/abp


    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I have refunded your current question ticket.

    Thanks.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on January 20, 2026, 07:04
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.