Open Closed

Register Service in Blazor App #1879


User avatar
0

Hi,

I have modified the volo framework - Volo.Abp.LanguageManagement , to add a new Interface - ICustomLanguageTextAppService. When I try to run the Blazor App I get the following error when - "There is no registered service of type 'Volo.Abp.LanguageManagement.ICustomLanguageTextAppService'"

The ICustomLanguageTextAppService inherits from the Volo.Abp.LanguageManagement interface ILanguageTextAppService. I have also modified the LanguageTextAppService with additional methods, to implement the new Interface ICustomLanguageTextAppService.

The question I have is, when I create a custom Interface inside the Volo.Abp.LanguageManagement module , how do I properly register the Interface / servcie in my Blazor App? I had no problems when I registered the ILanguageTextAppService in the same app.

Thanks,

Jesse

  • ABP Framework version: latest
  • UI type: Blazor Server
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): No
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi, you can try this:

    public interface ICustomLanguageTextAppService : ILanguageTextAppService
    {
     ....
    }
    
    [ExposeServices(typeof(ICustomLanguageTextAppService), typeof(ILanguageTextAppService))]
    public class CustomLanguageTextAppService : LanguageTextAppService, ICustomLanguageTextAppService
    {
     ....
    }
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0

    Thank you liangshiwei , this worked!

    Jesse

    Hi, you can try this:

    public interface ICustomLanguageTextAppService : ILanguageTextAppService 
    { 
     .... 
    } 
    
    [ExposeServices(typeof(ICustomLanguageTextAppService), typeof(ILanguageTextAppService))] 
    public class CustomLanguageTextAppService : LanguageTextAppService, ICustomLanguageTextAppService 
    { 
     .... 
    } 
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
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.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.